campaignmonitor / createsend-python

A Python library for the Campaign Monitor API
http://campaignmonitor.github.io/createsend-python
MIT License
57 stars 64 forks source link

Is it possible to override the From field in a smart email? #74

Closed sbstp closed 3 years ago

sbstp commented 3 years ago

I want to change the From/Reply-To fields when sending smart email. Is it possible to do this? The from field is not available in the function.

markstaples commented 3 years ago

Hi @sbstp - for Transactional Smart Emails, the From/Reply-To fields are defined in app for the specific email. Only Transactional Classic Emails allow for the From/Reply-To to be set on API call.

sbstp commented 3 years ago

Is it possible to put a template in the From field then? If I set the From field to like [fromEmail=] will it get replaced by the value I send in in the API call like '{"fromEmail": "whatever"}`

markstaples commented 3 years ago

Yes, you can use [FromEmail=] template variable in from field. This help doc should help:

https://help.campaignmonitor.com/smart-transactional-email-variables#where-email-variables-can-be-used

sbstp commented 3 years ago

Thanks a bunch!