By Toki Bano
Hey there, I’m passing a hard time configuring mail on nginx. Hope someone could help me. Sorry if it looks dumb but I’m coming for another host provider which has some settings by default.
So, I have a droplet which hosts several websites. They’re mainly in WordPress. The thing I like to do is enable all of them to send emails, so they can receive one from WP when they lost their password, their websites could have a contact form, etc.
I tried all day long (seriously) a way to configure stuff like sendmail, msmtp and alike with no success. I can’t telnet Google on any port (was trying to configure GMail for this) and none of the default tutorials related to PHP mail() function has worked.
It seems to me a concern related to domain names. But since my droplet hosts several websites, I just don’t know what I have to put on my hosts file. It actually have
127.0.0.1 localhost mydropletname mydropletname
whereas mydropletname is the name it appears when I type hostname.
Currently the last log error from my sendmail log file is
Deferred: Connection timed out with alt4.aspmx.l.google.com.
sendmail is configured with default for everything (just hitted YES for all).
I’m desperate. Filling the gap for a colleage that went ouf of our company and I’m pretty new to it. Appreciate any help.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi @tokiBano,
I’m not sure what version of Ubuntu you’re using, but this should apply to all of them. Give this a shot, and let us know how it goes:
This comment has been deleted
This comment has been deleted
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.