Open cuyogomez opened 4 years ago
Hi @cuyogomez,
I had a similar question and found out that you can pass the template data in a Personalization
: https://github.com/vapor-community/sendgrid-kit/blob/e5f7506f9cc6b10cf0f52cb08ab4b9a43cfba6dc/Sources/SendGridKit/Models/Personalization.swift#L24
So if you set the templateId
in the SendGridEmail
and the substitutions for your handlebars in the Personalization
, it should work.
Hey everyone, have any of you sent a main using the dynamic template generated by SendGrid? According to documentation if we sent the
templateId
it will not care what we set to the content and subject but the API requires to havecontent
set. So, when I set thecontent
to text like[ "type": "text", "value": "Condominus Invitation" ]
, I receive the email with just that set in thecontent
and not sending the template generated. I've been investigating the issue and it seems the documentation it's not sending thecontent
property within the example they have here. I tried to send the post manually and it didn't worked as well. In summary, I'm stuck in sending template emails created in SendGrid. Any tips? Thanks in advance.