Have you ever struggled with a SMTP mail server? Not any more!

Don Li
2 min readAug 30, 2019

--

While it is fairly easy to set up a SMTP mail server via a hosting company what if that option is not available? And you need your application to send or retrieve email. Then what?

Probably you’ve heard of Google’s free SMTP mail server. it sounds good… when you google for it, usually you get something like the following:

“To use Gmail’s SMTP server, you will need the following settings for your outgoing emails:

Outgoing Mail (SMTP) Server: smtp.gmail.com

Use Authentication: Yes

Use Secure Connection: Yes (TLS or SSL depending on your mail client/website SMTP plugin)

Username: your Gmail account (e.g. user@gmail.com)

Password: your Gmail password

Port: 465 (SSL required) or 587 (TLS required)”

So, you write code per the above explanation… BUT BUT it won’t work because the above info is incomplete. To make it work you need to do three more things.

And if you need to receive email for that Gmail account programmatically as well then you would also need to configure or write your code for pop mail properly as well.

In sum, the purpose of this short piece is to inform software developers that

(a) Yes, you can make gmail SMTP mail server work

(b) But it is quite involved

(c) Information out there about how it works is not accurate

(d) Thus, if you want to figure out how it works it may take quite a bit of your time plus frustration

(e) Alternatively, I can provide you with the EXACT steps to take to get it to work for $5.

All and all, I hope you find this short piece informative.

--

--