flyhopeSSL env MailerSend
This commit is contained in:
23
php/php-dog/tstMailerSendEmail.php
Normal file
23
php/php-dog/tstMailerSendEmail.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
use MailerSend\MailerSend;
|
||||
use MailerSend\Helpers\Builder\Recipient;
|
||||
use MailerSend\Helpers\Builder\EmailParams;
|
||||
|
||||
$mailersend = new MailerSend(
|
||||
['api_key' => getenv('API_KEY')]);
|
||||
|
||||
$recipients = [
|
||||
new Recipient('p.hoppe@gmx.de', 'HoPe'),
|
||||
];
|
||||
|
||||
$emailParams = (new EmailParams())
|
||||
->setFrom('dog@flyhope.de')
|
||||
->setFromName('FlyHoPe')
|
||||
->setRecipients($recipients)
|
||||
->setSubject('Dog Test')
|
||||
->setText('This is the text content')
|
||||
->setReplyTo('dog@flyhope.de')
|
||||
->setReplyToName('DogFound');
|
||||
|
||||
$mailersend->email->send($emailParams);
|
||||
?>
|
||||
Reference in New Issue
Block a user