Hello team i tried to send mail out by connect to my gmail and php mail function, but it seem likes not working, your server deny send mail out? or i wrong some config information on my server? this is the log i send mail out by php mail function My unqualified host name (centos-512mb-sgp1-01) unknown; sleeping for retry this is the log send by phpmailler(the php library send mail via smtp) Jan 24 18:22:19 centos-512mb-sgp1-01 postfix/qmgr[29831]: 442CE41923: from=apache@centos-512mb-sgp1-01.localdomain, size=1431, nrcpt=1 (queue active) Jan 24 18:22:19 centos-512mb-sgp1-01 postfix/qmgr[29831]: 45F3B3F256: from=root@centos-512mb-sgp1-01.localdomain, size=604, nrcpt=1 (queue active) Jan 24 18:22:19 centos-512mb-sgp1-01 postfix/qmgr[29831]: A2B44403C9: from=root@centos-512mb-sgp1-01.localdomain, size=542, nrcpt=1 (queue active) Jan 24 18:22:19 centos-512mb-sgp1-01 postfix/error[30105]: 45F3B3F256: to=ngodanghuuha@gmail.com, relay=none, delay=1072, delays=1072/0.01/0/0.01, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to alt2.gmail-smtp-in.l.google.com[2607:f8b0:4003:c09::1b]:25: Connection timed out) Jan 24 18:22:19 centos-512mb-sgp1-01 postfix/error[30106]: A2B44403C9: to=ngodanghuuha@gmail.com, relay=none, delay=471, delays=471/0.02/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to alt2.gmail-smtp-in.l.google.com[2607:f8b0:4003:c09::1b]:25: Connection timed out)
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!
Configure a fully qualified domain name for your hostname. Something like server.example.com then give the hostname the IP of the droplet in the DNS management system for your domain. Make sure to set this hostname in your DO control panel too (so the reverse DNS for your DO IP resolves properly). You’ll then need to set SPF records so this server is authorized to send email on behalf of your domain. There are more things to do to ensure proper mail delivery. But this is a good start.
Cheers
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.