You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to use a template from my sendgrid account with this library? I ask because the example code on the github for this library uses django.core.mail code and im not sure how to pass the template id as recommended in the sendgrid documentation.
The text was updated successfully, but these errors were encountered:
from django.core.mail import EmailMultiAlternatives
mail = EmailMultiAlternatives(
subject=subject,
body=body,
from_email=from_email,
to=[to_email]
)
# Here you can assign template_id from Sendgrid
mail.template_id = template
mail.substitutions = subs
if file is not None:
mail.attachments = [(file_name, file, 'application/pdf')]
mail.attach_alternative('test', "text/html")
mail.send()
Is it possible to use a template from my sendgrid account with this library? I ask because the example code on the github for this library uses django.core.mail code and im not sure how to pass the template id as recommended in the sendgrid documentation.
The text was updated successfully, but these errors were encountered: