-
Notifications
You must be signed in to change notification settings - Fork 782
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
Substitution is not working #441
Comments
Hello @sydneyhenrard, Here is a complete example. It appears that you need to set the With Best Regards, Elmer |
Is there a convention on variable?
The received email:
|
Hello @sydneyhenrard, I was able to reproduce this issue. I have added this to our backlog for a fix. It looks like given n substitution, substitution 0 is not getting set properly. With Best Regards, Elmer |
@thinkingserious is this on your end or an issue with the Node SDK? |
It's an issue with the SDK. I'm not quite sure exactly what the issue is though. I plan to examine the payload to help troubleshoot. |
If I use camelCase variable, I have no problem with the substitutions even for substitution 0 |
Thanks @sydneyhenrard, That should help get to the root cause quicker :) |
I think I may know what the problem is, let me investigate. |
#442 should fix this 👍 |
Merged as v6.1.3, thanks @adamreisnz! |
For helping us solve this issue, we would like to send you some swag as a token of our gratitude. Thanks for supporting SendGrid! With Best Regards, Elmer |
had the same problem in 01/2018. changed our substitution variables from %companyname% to %company_name% because single word variables were not working. fixed immediately. |
Hi @greglbyv, What version of the SDK are you using? Thanks! With Best Regards, Elmer |
Are substitutions supposed to work when using design built template? I can get them working only when I build the template by hand, the ones built with the design tool never work. |
@airstofather, To help you out I will need further detail. 1) Which template are you referring to? 2) Could you provide sample code? Both the template HTML and the Node.js code. Thank you! Also, it might be best to open a separate issue. Thanks! With Best Regards, Elmer |
Please ignore my previous comment. After your reply I went back to look at it with fresh eyes and it was an extra space in the interpolated variable that was causing the issue which I didn't catch the first time. All is working as advertised. Thank you. |
@thinkingserious I have tried everything, camelcase, underscore. The variable still would not populate, when I do the testing via the sendgrid UI and pass in the variable, it works fine. It just wouldnt work through firebase cloud functions. Here's my code I am using "@sendgrid/mail": "^6.3.1"
|
Issue Summary
I migrated from
sendgrid 2.0.0
to@sendgrid/mail 6.1.2
, the substitutions are not working anymoreSteps to Reproduce
Technical details:
The text was updated successfully, but these errors were encountered: