Conversation
…template data using the SendGrid API.
|
Ok, it seems there's an issue with how SendGrid determines what to send sendgrid/sendgrid-nodejs#435 (comment) Even though the docs say def html_body
"0"
endI'll need to see if there's a way to remove the |
|
Most of the API was implemented using NamedTuple which isn't dynamic. You can't dynamically add in keys, or remove them. The Sendgrid API docs don't mention this, but the theory here is that if you add 2d59edb refactors the interface to use Hashes so we can add/remove keys dynamically to the params. This also caused a bit of a compiler headache... I'm going to add this to my app to fully test this. If it works, we can keep it in... if not, then I'll revert and consider adding in the |
|
That worked! No need for the |
This adds in the ability for an email to specify a Dynamic Template https://docs.sendgrid.com/ui/sending-email/how-to-send-an-email-with-dynamic-transactional-templates
Dynamic templates are designed and created within the SendGrid website itself. The template builder allows you to specify handlebar type variable placeholders. In the API, you send the
template_id, and thedynamic_template_datahash, and SendGrid compiles the email for you to send that.To use this feature, you would just define two specific methods in your email.
Since this is pretty custom to SendGrid, I couldn't see a way to make it more generic to be a Carbon specific feature.