Does Sendgrid web api work with Django on Digitalocean?

February 18, 2017 237 views
Django Ubuntu 16.04

I have integrated sendgrid's web api into my Django web app. However email can only be sent on the development server on my local machine. If I try to send an email on the web app on my droplet, then no email is sent.

The code being run on the development server is exactly the same as what is being run on my droplet.

Any hints or tips would be really appreciated.

1 Answer

@marcelomata91

SendGrid does indeed work, though like many providers of transactional e-mail solutions, if this is a newer account with them, they do impose some limits (unless you're paying). Typically, this is limited to slowing down the actual send rate, which means it could be 5-30 minutes before the e-mail that you just sent is actually received by the other party (I ran in to this about a week ago, so I can confirm this).

https://sendgrid.com/docs/Classroom/Send/WhenEmailsAreSent/seeingadelaywithyourfirstfewsends.html

Likewise, if you're trying to send e-mail through Port 25 and this is a new DigitalOcean account, you may be getting limited as DigitalOcean does this on newer accounts to prevent SPAM.

Have another answer? Share your knowledge.