You need to do little extra. Login to your DigitalOcean account and follow instructions in the link to add MX records for sendgrid.
https://www.digitalocean.com/community/questions/how-to-make-sendgrid-work-on-digitalocean On Thu, Aug 2, 2018 at 7:03 AM, Azeez Akinsola <[email protected]> wrote: > Thank you Hashmi for your help. I am using sendgrid for sending emails > > Please check my .env and settings.py files I deployed to the server, I am > not sure if need to add or remove any variables > > SEND_GRID_API_KEY = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' > EMAIL_HOST_USER = '[email protected]' > EMAIL_HOST_PASSWORD = 'xxxxxxxxxxx' > EMAIL_PORT = 587 > EMAIL_USE_TLS = True > DEFAULT_FROM_EMAIL = '[email protected]' > ACCOUNT_EMAIL_SUBJECT_PREFIX = 'Registration Confirmation' > EMAIL_BACKEND = 'sgbackend.SendGridBackend' > > > settings.py > > EMAIL_BACKEND = os.getenv("EMAIL_BACKEND") > SENDGRID_API_KEY = os.getenv("SEND_GRID_API_KEY") > DEFAULT_EMAIL_BCC="" > DEFAULT_EMAIL_FROM = os.getenv("DEFAULT_FROM_EMAIL") > > > On Thursday, August 2, 2018 at 2:32:51 PM UTC+1, M Hashmi wrote: >> >> Set your SMTP configurations in settings.py. Make sure to follow wsgi >> handler properly by adding IP in ALLOWED_HOSTS = ['yourIP']. Make sure >> you've setup MX records for your domain configuration with DIgitalocean. >> >> On Thu, Aug 2, 2018 at 4:42 AM, Azeez Akinsola <[email protected]> >> wrote: >> >>> Hello everyone, >>> >>> I need help to fix this problem. My application works perfectly on my >>> localhost, but after deployment to a digital ocean server, I encounter >>> server error 500 and 400. >>> I attached the log error. Please, I need someone to help to fix this. >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Django users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To post to this group, send email to [email protected]. >>> Visit this group at https://groups.google.com/group/django-users. >>> To view this discussion on the web visit https://groups.google.com/d/ms >>> gid/django-users/21a8d436-43db-4d6f-8579-a906f5fe61ea%40googlegroups.com >>> <https://groups.google.com/d/msgid/django-users/21a8d436-43db-4d6f-8579-a906f5fe61ea%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/django-users. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/django-users/af49aac4-5779-4252-a64f-e3546b791018%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/af49aac4-5779-4252-a64f-e3546b791018%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CANoUts6maFWQ3fgo6j%3DAEXt1UwsvEAeCcO0%3Ds-6%3Dktocv%2BaVFg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

