jedenweb/mail

Email factory for Nette Framework

v2.4.1 2018-02-25 14:50 UTC

This package is auto-updated.

Last update: 2024-12-27 22:17:41 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();
	}