LAMP php mail only sending to gmail

I have a droplet setup using the LAMP by DigitalOcean OS Ubuntu 18.04 framework (which includes Postfix), and in testing out the php mail() function, I find that sending or cc’ing email to a Gmail address works perfectly. However if I try sending to my personal Fastmail account, OR a Yahoo account, the email never arrives. Seems that it’s only working with Gmail for some reason. The install is straight out of the box meaning I haven’t configured anything. Any ideas? -Thanks


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

OK, so I configured Postfix to use my Gmail account as my SMTP server and all is good now. Still not sure why the email wasn’t showing up in my inboxes before, but they are now! Hope this helps someone…