Skip to content
/ Mail Public

Package for more comfortable works with Nette\Mail\Message

Notifications You must be signed in to change notification settings

Kappa-org/Mail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kappa\Mail

Package for more comfortable works with Nette\Mail\Message

Requirements:

Installation:

The best way to install Kappa\Mail is using Composer

$ composer require kappa/mail:@dev

Usages

Register extension:

extensions:
	messages: Kappa\Mail\DI\MailExtension

In config file you can define messages

messages:
	messageName:
		option: value
		options:
			- value

Message options corresponds with API Nette\Mail\Massage class

Actual options:

  • from - string
  • subject - string
  • returnPath - string
  • priority - integer
  • replyTo - array
  • to - array
  • cc array
  • bcc - array
  • embeddedFile - array
  • attachment - array

Example usage

In your code:

class Model
{
	private $messageFactory;

	public function __construct(\Kappa\Mail\MessageFactory $messageFactory)
	{
		$this->messageFactory = $messageFactory;
	}

	public function sendMail(array $data)
	{
		$message = $this->messageFactory->createMessage('messageName', 'email_template.latte', $data);
		//...
	}
}

About

Package for more comfortable works with Nette\Mail\Message

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages