Comments (3)
Hi @JordyMiljaar,
Thank you!
The bcc
function works. You can add bcc contact by using addBcc()
method like,
$email = new Email('mailgun');
$email->template('default', '')
->from(['[email protected]' => 'Example'])
->addTo('[email protected]', 'Foo')
->addBcc('[email protected]', '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 recipient-variables
option and multiple addTo()
method like below,
$recipients = [
'[email protected]' => [
'name' => 'Foo'
],
'[email protected]' => [
'name' => 'Bar'
]
];
$email = new Email('mailgun');
$email->template('default', '')
->from(['[email protected]' => '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();
from cakephp-mailgun.
Thanks a lot 😉
I used just bcc()!
from cakephp-mailgun.
👍
from cakephp-mailgun.
Related Issues (19)
- Issue when sending emails with attachments in 1.0.6 HOT 5
- Mailgun\Tests\Mock\Mailgun is not available on mailgun-php after version 2.1 HOT 2
- Mailgun EU Support is missing. HOT 3
- CakePHP 3.7 deprecations HOT 1
- Token HOT 4
- Class 'App\Controller\MailgunEmail' not found HOT 1
- Use MailgunEmail features in Mailers HOT 4
- cURL resolving timed out Mac Os Mojave HOT 9
- making use of the status codes when there are errors returned from Mailgun HOT 4
- Upgrade for CakePHP 4.x HOT 1
- plugin doesn't send attachments HOT 1
- Domain HOT 2
- Sending emails in a loop causing _formData to persist
- Unknown email configuration "mailgun". HOT 4
- i am facing this issue HOT 2
- Transport class "mailgun" not found. HOT 2
- How to use inline attachments? HOT 5
- Deprecated warnings in CakePHP 3.6 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cakephp-mailgun.