Closed stof closed 2 years ago
How does that work, you save the copy in their systems and just uses these merge tags?
When sending the API call, the body of the message contains stuff like *|USERNAME|*
and the request contain an additional parameter giving values for variables (username
in this case) for each recipient. Then, the Mandrill server will generate a separate message per recipient and replace merge tags with their values.
This is similar on Sendgrid (which call them substitutions) except that the don't enforce the *|...|*
delimiters for them and just replace what you pass a variable.
Mailgun and Postmark don't seem to support it AFAICT. There is 2 solutions here:
The remaining question is how much we want to abstract the differences between Sendgrid and Mandrill regarding the implementation of the feature.
Supporting that without abstracting the differences does not make sense (if the code is coupled to a single mailer implementation anyway, using the SDK of that provider makes more sense). And abstracting differences would be very hard.
Sendgrid and Mandrill are supporting merge tags. This could allow to offload our servers by avoiding to generate a different email for each recipient when only small variations are needed