Question

Sending emails from a droplet on which i didn't set a domain name doesn't work

I have a droplet that runs on Ubuntu 18.04 and i’m trying to send a few emails(2/day) to my own email accounts(Google and Yahoo). On this droplet i only have the IP up and running(no domain name) and i’m using PHPMailer.

The first email made it to Yahoo but since then no email survived(not even as SPAM).

Is there a problem with not having a domain name?

Thank you!


Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

You don’t need to have a domain associated with a droplet in order to send emails to external mail services. I suggest you take a look at the logs of your MTA (Mail Transfer Agent) to see what’s happening when the droplet tries to send an email.

You haven’t mentioned which exact MTA you’re using on your droplet (exim4, Postfix, sendmail, etc.) so I can’t point you to the exact log location, but you’ll likely find what you’re looking for in /var/log where all logs are usually stored. The logs will give you at least a general idea of what’s the root cause of the issue and will make further troubleshooting easier.

Also, it’s important to note that the emails you send from your droplet after you resolve the issue will likely start ending up in the Spam folder on the receiving end since you don’t have proper SPF, DKIM & DMARC DNS records for your droplet. There’s really no way around that other than manually marking the emails as not spam in an attempt to train the spam filters to start letting the emails coming from your droplet’s IP go to the Inbox folder.