jedenweb/mail

Email factory for Nette Framework

v2.4 2016-12-17 23:24 UTC

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();
	}