Outlook - using 2 different email protocols - email

Not sure if the title is completely correct, however,
I am having an issue where I have 2 email addresses, 1 for work, 1 for personal, On my laptop I have a version of Outlook, When I am at work and connected to their wifi I am connected to the exchange and can only send from my work email (exchange account) however I cannot with my personal mail (POP mail) when Testing account settings, it connects to the Pop server but cannot send anything through SMTP (Port 25, the email provider does not support SSL), And when I'm at home I am able to send from it, but not the exchange(However once I'm home from work I don't want to be dealing with work emails so that's fine)
does anyone have any ideas what could be happening, My best guess is our exchange server at work is using port 25 and is using it exclusively and not letting anything else make a connection through it, would this be correct?
Thanks in advance.

Most companies (and even some ISPs) block port 25 for security reasons. You will need to talk to your IT department to know for sure.

It has nothing to do with
My best guess is our exchange server at work is using port 25 and is using it exclusively and not letting anything else make a connection through it
Port 25 is specific to mailer-domains. The mailer's(like google, yahoo) servers listen at port 25 to recieve the mails, for example gmail or rediffmail will have servers which would be running a service on port 25 to accept/send all the mails. Usually as per the company policies they do-not encourage the usage of personal mail ids, so they block the call to the mailers.

Related

Google Compute Engine won't send emails with links

Recently I moved my site to GCE and now emails are not being sent. I send them using gmail's smtp server, through the port 465.
A simple google search points to this article, in which they say that I must use a third party solution like SendGrid.
The weird thing is, I can send regular emails. I was testing my site and I am able to send a simple email with "Hello world" in the message body. But the moment I add a link (URL address) to the body message, the email is not sent.
Is this an expected behaviour? Is there a work around?
I think it's dumb for Google to not allow sending emails even though its own Gmail servers.
Perhaps there is some confusion here. "Despite" of what they say...
Look at their article on Sending Email from an Instance and I quote:
"Google Compute Engine does not allow outbound connections on ports
25, 465, and 587 but you can still set up your instances to send mail
through ports 587 and 465 using servers provided through partner
services, such as SendGrid."
They clearly state that you CAN do it.
Also, if you're authenticating with your Google Account to send via smtp.gmail.com, you're authenticating with a username and password just like any standard email client would. So why would that not be allowed? You're basically connecting as an email client.
On another note, your issues with links were related to the quality of the message therefore being marked as spam (GCE wasn't causing any problems.) by Gmail, as I suspected in my previous comment. You're mainly using Gmail here, and not really any issues directly related to GCE.
I hope this clarifies things a little.
Apparently Google Cloud (despite of what they claim) does allow smtp traffic. I added the firewall exception of the port tcp:465 for all IP addresses.
Additionally, emails containing links were being sent to the spam box, but just on my email account. I sent it to another account and it worked just fine.
[Edit]
GCE had nothing to do with the links problem. It was the poor design of my email content that caused it to go to the spam folder.
The solution was already there. Open the right firewall ports and you're good to go.

Send email from server without SMTP enabled

I have written a couple of web sites that contain a "contact us" form.
However, our host recently switched SMTP off. Their excuse is "security issues".
The solution they offer is that they implemented rules whereby all mail generated from the platforms must be sent using the sendmail/phpmail functions and pass through a mail relay which checks the mails and their content and ensures malicious content and activity is completely blocked and they recommend I use "A virtual or dedicated solution".
I have no idea what it is they want me to do to get emailing working again and this is quite urgent as many clients are not getting their emails.
Is there an easy way to go around this in order to get emailing working again?
Many thanks in advance
It generally means that you will have to specify the new mail server they are providing instead of localhost in your code. Further, earlier, you were able to send the mail without authenticating but now on, you must have an account and you must authenticate before you send the mail. (I am not sure though, may be they allow relay to their own servers and you might not need authentication).
Go to the control panel of your hosting account and check for the mail panel. Check out the new smtp server name there and code your site to use this smtp server with credentials. This will let you send mail again.

Can the underlying email provider be determined from an email address?

We are building a system that is, effectively, an email/calendar/contact client.
Users will provide us with their email address password (or other auth, eg oauth) and we will connect to their underlying email system.
"underlying systems" include:
Microsoft Exchange / Office365
GMail
Yahoo Mail
Apple email
Generic IMAP
Each of these systems have subtle (and not so subtle) differences in their APIs, especially to access calendar & contact data. Thus we need to know what provider the user is using.
But we would rather not ASK the user. We would like to figure it out (and at, least reduce the choices) automatically.
I've looked around for something that already implements this but have not found anything. I know it's mostly possible because Windows Phone does it pretty well (just enter username/pw and it does the right thing).
Before I dive in and start writing my own I want to ensure I'm not wasting my time if someone's already done it in an excellent way.
Know of anything like this? For this project prefer C#/.NET.
[EDIT: Adding potential algo]
Potential Algorithm:
Given email address & password
Extract domain name from email address
Try Exchange autodiscover. If successful done.
Use DNS MX records to find smtp host.
Do SMTP EHLO
Gmail responds with "250-mx.google.com at your service"
So if we see a "google.com" we are done.
Yahoo responds with 250-mta1257.mail.sk1.yahoo.com
So if we see a "yahoo.com" in the response we are done.
Apple responds with 250-xxxxxx-mac.com
So if we see a "mac.com" in the response we are done.
If none of the above
IMAP?
...
[EDIT: 5/18]
I built a prototype that uses methods that don't require auth (e.g. just MX/SMTP sluthing). Give it a try: http://bit.ly/KLZKxD
Algorithm seems reasonable. You will get best results running from unfiltered server (meaning it has direct SMTP outbound / doesn't run through a proxy). If running from client (mobile/tablet/desktop), then no guarantees as some ISP's pass SMTP through a proxy relay hence EHLO response is only for proxy.
You may want to do a port check for servers to verify expected protocol support (just a TCP connect may be sufficient but protocol handshake is preferable). Additionally, best to build up a database of verified SMTP and IMAP server mappings as there can be split names (e.g. smtp.domain.com and mail.domain.com) - discovering SMTP is easy, discovering outbound server(s) which usually also means calendar/contacts server, not so much (except for Exchange but only if autodiscovery is configured correctly).
If you can get your users to approve and assuming you have their username/password, you could try connecting to SMTP via MX record and sending an email back to your own address then checking through headers for useful info about the server (needs to be authenticated to relay). Users could alternatively reply to an email you generate in order to get the same server info.
Also ensure that you do your own DNS query and try each MX record or all primaries -- if the principal MX is down or DNS is poorly configured for equal weighting, you could end up hitting a smarthost / backup which may just be a dumb SMTP relay / store-and-forward and not give you the correct response.
TL;DR: No quick solution but a cascaded algorithm that trys and fails different solutions until one works / gives an expected result should work.
Most devices can auto detect the service by parsing the Whole e-mail address. Xyz#gmail.com would obviously be a gmail account. So for Apple, Gmail, Yahoo, Live, Hotmail etc you can easily program for.
For other domains, including custom, you can try this: http://www.exclamationsoft.com/exclamationsoft/netmailbot/help/website/HowToFindTheSMTPMailServerForAnEmailAddress.html
You can detect Google Apps For Your Domain accounts by examining the domain's MX records. If the primary MX record is ASPMX.L.GOOGLE.com, then it's GMail.
I created an implementation of this that has been used widely with some success: https://github.com/tig/Email2Calendar
This is used by both milelogr.com and freebusy.io.

Can I use my web server as mail server?

I have a dedicated Linux web server where my website is running like www.example.com.
Now I want to start another service for my users and want to give mailing features like Gmail and Yahoo mail.
I want to give facility to my users to create email IDs as they create on Gmail or Yahoo Mail and use it as their email address like XYZ#example.com or ABC#example.com.
Is this possible for me to use my dedicated web server as mail server too,
or I need to hire a new specific mail server for this purpose.
Also, if I can use my server as mail server and can give IMAP and POP like features then what are the PROs and CONs in that?
My hosting company says that I have facility to create unlimited email addresses
and I have created a few for mt like support#example.com and feedback#example.com
and I am getting emails on these IDs.
Is that mean, my hosting already have setup a mail server for me (the same I mentioned in my question and want to setup)
Or this is just for me to use and manage my website and I can not share these email addresses with my users by giving an email service.
Yes you can run simultaneously a web and mail server. Follow part 3 of this guide: http://mysql-apache-php.com/ to set up email. Just make sure that your router is fully capable (supports NAT etc.) - it should be able anyway
However it does appear from your question that your hosting company has set up its own mail server. Which does mean unlimited emails, however the only issue could be the amount of space they are willing to host for you (As in you can only have 2 GB of space on their mail server). Hope this helps.

Development SMTP Server

I need a cross platform (at least windows and mac) development utility that runs as an SMTP server that acts as an SMTP server but will redirect all mail to a single address that's configurable. It would also be helpful if it wrote the contents out to a file or gui. Long ago I configured Apache James to do this but it wasn't that straight forward to figure out. Hoping there's something really simple out there.
I need the emails to be forwarded (to the single address) so I can see how they are rendered on different clients (gmail, outlook, etc.)
Thanks! -Mike
We used Mailtrap for this. It give you remote smtp server account and direct access to all mails in it. So you just enter given smtp credential in your application and after that all email sent by your system will be visible on mailtrap.
On mailtrap you can have as many smtp account as you want( different account for different application environments, or different application) Also you can manage access to your account ( so only trusted people will se your emails) and you can forward some emails to real email addresses.
It doesn't do the forwarding you are looking for, but for most of my testing I make use of fakemail (http://www.lastcraft.com/fakemail.php) it's simply a script that listens on a port an acts as an smtp server, writing any incoming mail to a directory.
You could use Python's smtpd library and override the process_message function to only send to the desired address -- i.e. replace the "to" field with your desired constant email address.
Here's a page with some examples of using smtpd (with asyncore) to actually send out mail.