Reputation: 56
In php, I am sending email to users while registering.
Now I want to send one email to admin as well at the same time, But message will be different, like "New registration"
to admin and "Thank you for registering"
to user.
Is this possible ? I am using Mandrill
.
I know about sending email to multiple recipient but the same message not the different.
Upvotes: 0
Views: 99
Reputation: 111
As per Mandrill API documentation, you can have multiple recipients for a message, but only 1 email/subject.
The easiest solution would be to just make 2 API calls with different message content (1 for the user, one for the admin).
But if you were dead-set on making a single API call, you would need to utilize the message customization feature that allows you to define merge_tags for recipients.
The body/subject would each become a merge tag, and you define the values of merge tags on a per-recipient basis. So you would define a different merge value for the user than for the admin for both the subject & body of the message.
Then Mandrill would substitute the correct subject/body message as it sent.
Upvotes: 1