Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jedenweb/mail

Email factory for Nette Framework
https://github.com/jedenweb/mail

Last synced: about 2 months ago
JSON representation

Email factory for Nette Framework

Awesome Lists containing this project

README

        

# Mail

Simple mail factory for [Nette Framework](http://nette.org/)

## Instalation

The best way to install jedenweb/mail is using [Composer](http://getcomposer.org/):

```json
{
"require": {
"jedenweb/mail": "dev-master"
}
}
```

After that you have to register extension in config.neon.

```neon
extensions:
mail: JedenWeb\Mail\DI\MailExtension
```

## Usage

### Send mail

```php

/**
* @inject
* @var JedenWeb\Mail\MessageFactory
*/
public $messageFactory;

public function sendMail()
{
$email = $this->messageFactory->create();

$email->message->addTo(...);
$email->template->data = ...;

$email->send();
}

```