Download the PHP package dkeysoft/mailer without Composer
On this page you can find all versions of the php package dkeysoft/mailer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package mailer
Introduction
This extension let you have one easy interface to send letters using different web services.
Example Use
Use composer:
composer require dkeysoft/mailer
If you use sparkpost, you need next:
composer require guzzlehttp/guzzle
composer require php-http/guzzle6-adapter
composer require sparkpost/sparkpost
You should rewrite "api_key" in config.php.
And then your code might look like this:
use dkeysoft\src\Recipient;
use dkeysoft\src\services\spark\Service as Spark;
$service = new Spark();
$recipient = new Recipient();
$recipients = [];
$from_name = 'My company name';
$from_email = '[email protected]';
$subject = 'Test subject';
$template_html = '<html><body><h1>Test HTML - {{name}} - {{code}} --- from {{company}}</h1></body></html>';
$template_text = 'Test Text';
$service
->setSubject($subject)
->setFromName($from_name)
->setFromEmail($from_email)
->setTemplateHtml($template_html)
->setTemplateText($template_text)
->setSubstitutionData([
'company' => 'My company name (substitution)'
]);
$recipient
->setName('UserOne')
->setEmail('[email protected]')
->setSubstitutionData([
'name' => 'My name One',
'code' => 'Code123123'
]);
$recipients[] = clone $recipient;
$recipient
->setName('UserTwo')
->setEmail('[email protected]')
->setSubstitutionData([
'name' => 'My name Two',
'code' => 'Code3333'
]);
$recipients[] = $recipient;
$service
->setRecipients($recipients)
->build();
$service->send();
All versions of mailer with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.5.0
The package dkeysoft/mailer contains the following files
Loading the files please wait ....