Sendgrid-nodejs: Not Getting Substitutions in "BCC or CC"

Created on 17 Jun 2016  路  8Comments  路  Source: sendgrid/sendgrid-nodejs

Issue Summary

if have been using transaction templates of sendgrid to send mails. We too have substitutions in mail templates. I am setting {CC and BCC} in every mail but not getting substitutions there in CC'ed mails.

Steps to Reproduce

  1. send mail to someone using sendgrid templates and add cc mail.
  2. Don't forget to add substitutions.
  3. You won't be able to see subtitution in cc'ed mails.

    Technical details:

  • sendgrid-nodejs Version: 2.0.0
  • Node.js Version: 4.1.2
duplicate

Most helpful comment

Please do the merge. This bug is affecting the whole community.

All 8 comments

Hello @harshitanand,

Thanks for the issue report. We are tracking this problem here: https://github.com/sendgrid/sendgrid-nodejs/issues/243

Thanks!

Lines 617 - 630 in helpers/mail/mail.js

this.addSubstitution = function(substition) {
    if(this.substitions == undefined){
      this.substitions = {}
    }
    this.substitions[Object.keys(substition)[0]] = substition[Object.keys(substition)[0]]
  }

  this.getSubstitutions = function() {
    return this.substitions
  }

Did you mean to use substitutions instead of 'substitions'.

@angus-ics yes, there is a pull request to fix this: https://github.com/sendgrid/sendgrid-nodejs/pull/250

I'm hoping to get that merged soon. If we don't get the CLA shortly, we will go ahead and make the fix.

Thanks for following up!

Please do the merge. This bug is affecting the whole community.

It seems the problem is still not solved in v.2.0.0

@swarm1,

Could you please give us some example code? I'm happy to investigate. Thanks!

I am using java API V2, how do i fix this ?

Hi @Jatinthakkar,

Thanks for reaching out to us!

Could you please post your question here along with some sample code so that I may try and reproduce the error?

Thanks!

Was this page helpful?
0 / 5 - 0 ratings