Hello,
I have to send more than one email on a single add event, each one with contents personalised by different addresses.
I know how to send to multiple addresses, but in the email_sending event I can't set different contents for different addresses,
Is there a way to do this?
Thank you!
multiple email sending
-
- User
- Posts: 41
multiple email sending
-
- User
- Posts: 41
what do you mean for conditional check?
I have to do something similar as below, two e-mails to different Bcc for the same add action, with different content; I think this is wrong
$Email->Bcc = "address1@xyz.com, address2@xyz.com";
if ($Email->Bcc == "address1@xyz.com") {
$Email->Content = "a";
}
if ($Email->Bcc == "address2@xyz.com") {
$Email->Content = "b";
}
-
- User
- Posts: 11784
Try:
$Email->Bcc = "address1@xyz.com, address2@xyz.com";
if (strpos($Email->Bcc, "address1@xyz.com") !== false) {
$Email->Content = "a";
}
if (strpos($Email->Bcc, "address2@xyz.com") !== false) {
$Email->Content = "b";
}