I am trying to send an email using the transactional template, sendgrid.
I am able to send a simple mail.
from_email = Email("[email protected]")
subject = "Welcome"
to_email = Email("[email protected]")
content = ("text/plane","Text here")
mail = Mail(from_email, subject, to_email, content)
I have created a template which I want to use to send emails. How can I do this?
I was using template_id parameter and passing through the Mail(), but it's not working.
template_id = "13b8f94f-bcae-4ec6-b752-70d6cb59f932"
I checked the class Mail(object) which has self._template_id parameter. The field in Mail() class is as follwos:
if self.template_id is not None:
mail["template_id"] = self.template_id
What am I missing here?
I just want to send a mail using the template I have created.