We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
API only allows strings for substitution values. This library will allow substitutions of non-strings and will fail on send attempt.
message = Mail()
personalization = Personalization()
personalization.add_to(Email('test@email.com'))
personalization.add_substitution(Substitution('-test-, 1))
message.add_personalization(personalization)
sg.client.mail.send.post(request_body=message.get())
Should an error be thrown when attempting to create a non-string substitution?
Issue Summary
API only allows strings for substitution values. This library will allow substitutions of non-strings and will fail on send attempt.
Steps to Reproduce
message = Mail()personalization = Personalization()personalization.add_to(Email('test@email.com'))personalization.add_substitution(Substitution('-test-, 1))message.add_personalization(personalization)sg.client.mail.send.post(request_body=message.get())400 returned because of int in substitution jsonShould an error be thrown when attempting to create a non-string substitution?