Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template not sent when using templateID #6

Open
cuyogomez opened this issue Jul 28, 2020 · 1 comment
Open

Template not sent when using templateID #6

cuyogomez opened this issue Jul 28, 2020 · 1 comment

Comments

@cuyogomez
Copy link

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 have content set. So, when I set the content to text like [ "type": "text", "value": "Condominus Invitation" ], I receive the email with just that set in the content and not sending the template generated.
I've been investigating the issue and it seems the documentation it's not sending the content 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.

@svanimpe
Copy link

Hi @cuyogomez,

I had a similar question and found out that you can pass the template data in a Personalization:

public var dynamicTemplateData: [String: String]?

So if you set the templateId in the SendGridEmail and the substitutions for your handlebars in the Personalization, it should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants