jedenweb / mail
Email factory for Nette Framework
v2.4.1
2018-02-25 14:50 UTC
Requires
- php: ^7.1
- nette/application: ^2.4
- nette/mail: ^2.4
Requires (Dev)
- latte/latte: ^2.4
- mockery/mockery: ^0.9
- nette/di: ^2.4
- nette/tester: ^1.7
README
Simple mail factory for Nette Framework
Instalation
The best way to install jedenweb/mail is using Composer:
{ "require": { "jedenweb/mail": "dev-master" } }
After that you have to register extension in config.neon.
extensions: mail: JedenWeb\Mail\DI\MailExtension
Usage
Send mail
/** * @inject * @var JedenWeb\Mail\MessageFactory */ public $messageFactory; public function sendMail() { $email = $this->messageFactory->create(); $email->message->addTo(...); $email->template->data = ...; $email->send(); }