Question

Email not working in App Platform

I have set up a new APP using the APP Platform. However, emails are not working. Our app has a module where users need to register and the mails are not reaching while doing tests. Has anyone else faced this and what was the solution you deployed - if any?

Subscribe
Share

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.

In case anyone else stumbles upon this thread, I just found a solution that worked for me. When you download the JSON key from a service account on google, it gives you a private key with regex line breaks. (\n) Whether you’re using Google or not, these line breaks are necessary for multiline values in .env files. That is NOT the case for DigitalOcean environment variables. The opposite is true. You must include actual line breaks instead of regex, because otherwise it gets automatically escaped, which causes it to be an invalid format.

I am basically doing email verification that uses smtp server…as i knw smtp ports are blocked on digital ocean. My code works on local host but not on production.

Hi Steve,

Did you find any solution to this. I also same issue and using App Platform.

Thanks

We have tried both 465 and 587. Both don’t work either. We use Sendgrid.

I’ve hosted the same app in our internal server and the mail sending with same code works fine.

👋@steveDolphin

Due to spam email issues we block SMTP traffic on port 25. We support connecting to SMTP servers on port 465 and 587 for authenticated mail sending. We highly recommend using a service such as MailGun or SendGrid for emails within you app.