Using Express to send verify email by SendGrid. Work Perfectly on localhost, but did not work on my droplets (Ubuntu 18.04.3 (LTS) x64)

I was working with Express and SendGrid to send email verification to my own Gmail. I tried on localhost it works perfectly. However, I did not receive any emails when I deploy and run on my droplet. Moreover, I did not receive any error messages. So I assume the program successfully sends the email but been blocked by some port. Therefore, I find this question I tried port 25 on my droplet it did not block. Any suggestions on why this is happening?

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.

Hi there @zhuxingyuan123,

By default for new accounts, port 25 is closed. I would recommend trying with port 587 instead.

To test if port 587 is open you can run the following command:

  1. telnet 587

Let me know how it goes! Regards, Bobby