sendgrid-templates

Sendgrid Dynamic Template Stripping HREF from Anchor tags

跟風遠走 提交于 2020-01-16 08:59:20
问题 I have a dynamic email template for sending a user a unique token link to reset their password. I assign the link to a field named 'link' in the dynamic_template_data section of my personalizations in my request object. When I receive the email, my anchor tag has no href attribute. Here is my request object: { method: "POST", url: "/v3/mail/send", headers: { "content-type": "application/json" }, body: { personalizations: [ { to: [{ email: email, name: name }], dynamic_template_data: { link:

Is there a way to use SendGrid Template Versioning with different development life-cycle environments?

会有一股神秘感。 提交于 2020-01-05 02:55:08
问题 Versioning in SendGrid allows API clients to make template requests only by template ID documented here, however, only one version of a template can be "Active" at a time. Obviously, the template used for our production applications needs to always be set to active, but what about adding a new template version we use in an upcoming release? How can I leverage template versions to test this "Inactive" version in our test environment? The issue was discussed here, but it seems to just be closed

Can I have an image with a substitution tag in a SendGrid template?

三世轮回 提交于 2019-12-23 10:56:36
问题 I am creating a template in SendGrid and I was trying to put an image in the center, and the URL I would like to be a tag so I can substitute dynamically in my code, because it will come from my database. I tried to simply place a tag in the input field, but it doesn't accept that. Is there a way I can accomplish that? Thank you! 回答1: I assume that you have managed to trigger the SendGrid API via Node.js, since you're tagging the question with the Express tag. I'm currently trying to build

Trigger sendgrid template email using meteor

醉酒当歌 提交于 2019-12-12 11:01:27
问题 I am using sendgrid to send an email. I want to send template as an email to users. Below code is just sending the simple text based email instead of defining the headers part and using the template id. if (Meteor.isServer) { Email.send({ from: "from@mailinator.com", to: "abc@mail.com", subject: "Subject", text: "Here is some text", headers: {"X-SMTPAPI": { "filters" : { "template" : { "settings" : { "enable" : 1, "Content-Type" : "text/html", "template_id": "3fca3640-b47a-4f65-8693

In Sendgrid Design template, how to use handlebar iteration for table?

六月ゝ 毕业季﹏ 提交于 2019-12-07 05:19:50
问题 I'm using SendGrid online "Design" template, with a module "code". In their documentation (https://sendgrid.com/docs/ui/sending-email/editor/#code-modules), they say that de code editor does not modify or validate any HTML . If I write this piece of code inside the code module: <ul> {{#each items}} <li>test</li> {{/each}} </ul> <table> <tbody> {{#each items}} <tr> <td>Col 1</td> <td>Col 2</td> </tr> {{/each}} </tbody> </table> it results in: <ul> {{#each items}} <li>test</li> {{/each}} </ul>

Variable substitution in SendGrid templates with Nodejs does not work

我只是一个虾纸丫 提交于 2019-12-02 09:42:39
问题 Following the USE CASE on SendGrids github does manage to send me the e-mail with the correct template, but the substitutions does apparently not work, and is left blank in the resulting e-mail. Server side: const sgmailer = require("@sendgrid/mail"); sgmailer.setApiKey(process.env.SENDGRID_API_KEY); sgmailer.setSubstitutionWrappers('{{', '}}'); const msg = { to: '...', from: 'sender@example.org', subject: 'Hello world', text: 'Hello plain world!', html: '<p>Hello HTML world!</p>', templateId