Allow template variables in sender
For transactional mails, we sometimes want to replace the sender name only, so instead of sending with the organization's name, we show the name of the person who has sent a message to the recipient in out application.
Instead of sending from
Organization noreply@organization.com
We want to send from
{{var:name}} via Organization noreply@organization.com
I found out the hard way that although template variables can be used in the subject, they lead to an error when used in the sender name field. Internally, this creates a new sender address and an administrator will receive a mail that that (invalid) address should be verified.
In order to fulfill the requirements stated above, we now have to set the sender email address and the dynamically replaced name in the app and send both the from field in the call to the Send API.
It would be easier to do one of the following
- Allow for variable replacement in the template configuration for the "Name" field in "Email and sender details"
- Allow overriding the from.name in the Send API call and leaving the from.email empty.