Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/xinix-technology/bono-mail

Mailer for bono
https://github.com/xinix-technology/bono-mail

Last synced: 3 months ago
JSON representation

Mailer for bono

Awesome Lists containing this project

README

        

bono-mail
=========

Mailer for Bono

Its simply thin wrapper to SwiftMailer now.

With bono-mail you can utilize bono configuration to bootstrap your mailer.

# Installlation

```
composer require xinix-technology/bono-mail
```

# Configuration

Edit config/config.php

```php

return array(
'bono.providers' => array(
// ...
'\\BonoMail\\Provider\\MailProvider' => array(
'defaultMessage' => array(
'from' => array('[email protected]' => 'John Doe'),
),
'transports' => array(
'smtp' => array(
'driver' => 'smtp',
'host' => 'localhost',
'port' => 25,
),
),
),
// ...
),
);

```

# Howto Use

```php

$result = \BonoMail\Mail::factory('Some subject for you')
->body('test', array())
->to(array('[email protected]'))
->send();

```

Above code will send mail to [email protected] from default from (from configuration)
with body from emails/test template.