sendgrid-apex
sendgrid-apex copied to clipboard
addSubstitution only adds the last element of the list
List<String> vals = new List<String> { 'val1', 'val2', 'val3' };
email.addSubstitution('sub', vals);
The above code will add the "sub" JSON but will only have "val3" in the substitution list.
Created pull request #3 to resolve this. This library is a big timesaver on a project I'm working on so I hope this helps!