oliveris/sdk-mail is a Laravel package for sends email and campaigns to a provider specified..
It currently has 0 GitHub stars and 64 downloads on Packagist (latest version v1.0.3).
Install it with composer require oliveris/sdk-mail.
Discover more Laravel packages by oliveris
or browse all Laravel packages to compare alternatives.
Last updated
Pupose of the SDK is to help with the delivery of mail and campaigns using multiple services.
Pull in the composer package by running the command below:
composer require oliveris/sdk-mail
Import the Mail namespace into the class (autoloading)
use Mail\Mail;
The following example demonstrates how you can send a basic email
$mail = Mail::getDriver('mailgun');
$mail->setKey('your_maligun_api_key');
$mail->setDomain('your_domain');
$mail->setTo('[email protected]');
$mail->setFrom('[email protected]');
$mail->setSubject('This is a test subject');
$mail->setBody('Lorem ipsum dolor sit amet, mollis hendrerit vix at. Altera meliore signiferumque vix an. Sonet delectus assentior eu sed, cu meliore ponderum quo. At quo idque virtute. Impedit mentitum est ei, assum abhorreant eam cu.');
$mail->send();
The following example demonstrates how you can send batch emails.
$mail = Mail::getDriver('mailgun');
$mail->setKey('your_maligun_api_key');
$mail->setDomain('your_domain');
$mail->setTo([
'[email protected]',
'[email protected]'
]);
$mail->setFrom('[email protected]');
$mail->setSubject('This is a test subject');
$mail->setBody('Lorem ipsum dolor sit amet, mollis hendrerit vix at. Altera meliore signiferumque vix an. Sonet delectus assentior eu sed, cu meliore ponderum quo. At quo idque virtute. Impedit mentitum est ei, assum abhorreant eam cu.');
$mail->send();
For further examples look in the tests/index.php.
We use Semantic Versioning 1.0.0, for example v1.0.0.
Text is open-sourced software licensed under the MIT license.