A
A
albertalexandrov2018-12-24 18:50:07
Django
albertalexandrov, 2018-12-24 18:50:07

[sendgrid] How to set return address in email?

Hello everyone!)
I am setting up mailing lists via the sendgrid service in a django project. I set up according to the instructions from the office. site .
Settings:

# settings.py
EMAIL_HOST = 'smtp.sendgrid.net'
EMAIL_HOST_USER = 'sendgrid_username'
EMAIL_HOST_PASSWORD = 'sendgrid_password'
EMAIL_PORT = 587
EMAIL_USE_TLS = True

Sending occurs using the send_mail() function:
send_mail('Subject here', 'Here is the message.', email_отправителя, [user.email])

sender_email is registered in the Address Whitelist.
As a result, letters arrive, but end up in spam with an explanation:
The sender has been verified. However, the email came from the sendgrid.net domain, which does not match the return address.
Sender: sendgrid.net
Signature: sendgrid.net
Encryption: yes
Spam: yes

Please tell me how to treat it, where to add the address.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rollex, 2020-03-28
@Rollex

You go to your Sendgrid personal account and go to the Settings -> Sender Authentication -> Domain Authentication section.
Then follow the prompts step by step.
And you will be happy)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question