I'm sending emails using the Sendgrid API, but every email that I send does not have the Subjet
.
My code looks like this:
def send_notification(sendgrid_key, p_email):
message = Mail(
from_email=('my_email@mail.com'),
to_emails=(p_email),
subject='subject email',
)
message.template_id = 'XXXXXX'
try:
sg = SendGridAPIClient(sendgrid_key)
response = sg.send(message)
except Exception as e:
print(str(e))
Eventhought, I have set the subjet
, I'm still receiving emails without subject. Moreover, I do not have any errors when my app run.