How to send mail (like noreply) with Django sendgrid
I am newbie!
I want to create a django application that sends mail. it worked well on localhost, but when I deployed it, it stopped working because the host doesn't support smtp. He suggested using sendgrid, and I'm stuck here...
enter image description here sorry i dont have permission to put pic only link views.py enter image description here error: enter image description here
The error message in the image that you have attached here is showing 403 forbidden which means the server understands the request but refuses to authorize it. Check whether from email address is used when you are verifying your send address. read docs in this link https://docs.sendgrid.com/ui/sending-email/sender-verification
and check all your settings for sendgrid is correct or not.
SENDGRID_API_KEY = os.getenv('SENDGRID_API_KEY')
EMAIL_HOST = 'smtp.sendgrid.net'
EMAIL_HOST_USER = 'apikey' # this is exactly the value 'apikey'
EMAIL_HOST_PASSWORD = SENDGRID_API_KEY
EMAIL_PORT = 587
EMAIL_USE_TLS = True