-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BCC #1
Labels
Comments
Hi @JordyMiljaar, The $email = new Email('mailgun');
$email->template('default', '')
->from(['example@example.com' => 'Example'])
->addTo('foo@example.com', 'Foo')
->addBcc('bar@example.com', 'Bar')
->emailFormat('html')
->subject("Mailgun Test")
->viewVars(['content' => 'demo content'])
->send(); And I think Mailgun takes little bit more time to send Bcc emails. Regarding multiple contacts, as per Mailgun, you can use $recipients = [
'foo@example.com' => [
'name' => 'Foo'
],
'bar@example.com' => [
'name' => 'Bar'
]
];
$email = new Email('mailgun');
$email->template('default', '')
->from(['example@example.com' => 'ExampleServer'])
->emailFormat('html')
->subject("Mailgun Test - " . date('Y-m-d H:i:s'))
->viewVars(['content' => 'demo content']);
foreach ($recipients as $mail => $contact) {
$email->addTo($mail, $contact['name']);
}
$email->addHeaders(['ev:recipient-variables' => json_encode($recipients)]);
$email->send(); |
Thanks a lot 😉 I used just bcc()! |
👍 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey
First off all, great plugin!
Is it possible that bcc doesn't work? Also, how do you add multiple contacts?
Best regards
Jordy
The text was updated successfully, but these errors were encountered: