leaps / leaps-swiftmailer
The SwiftMailer integration for the Leaps framework
Installs: 486
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Type:leaps-extension
Requires
- leaps/framework: >=3.0.0
- swiftmailer/swiftmailer: ~5.0
This package is not auto-updated.
Last update: 2016-08-24 04:09:20 UTC
README
This extension provides a SwiftMailer mail solution for Leaps framework.
For license information check the LICENSE-file.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist leaps/swiftmailer
or add
"leaps/swiftmailer": "~2.0.0"
to the require section of your composer.json.
Usage
To use this extension, simply add the following code in your application configuration:
return [ //.... 'services' => [ 'mailer' => [ 'className' => 'Leaps\Swiftmailer\Mailer', ], ], ];
You can then send an email as follows:
Leaps::$app->mailer->compose('contact/html') ->setFrom('from@domain.com') ->setTo($form->email) ->setSubject($form->subject) ->send();