Skip to content

Commit

Permalink
Read me file
Browse files Browse the repository at this point in the history
  • Loading branch information
mahmoud-birdsol committed Nov 21, 2018
1 parent 0b495c8 commit 82a9ddc
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 6 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
### Installation
```$xslt
composer require homicity/laravel-mandrill
```

Then publish the config file

```$xslt
php artisan vendor:publish --provider="Homicity\MandrillMailable\Providers\MandrillMailableServiceProvider" --tag="config"
```

### Config
TODO

### Usage

```$xslt
Mail::mandrill()
->to('[email protected]')
->name('John Doe')
->templateName('template-name')
->fromEmail('[email protected]')
->fromName('Example Website')
->subject('Hello Mandrill')
->send();
```
12 changes: 6 additions & 6 deletions tests/Features/SendMandrillTemplateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ public function it_sends_a_mandrill_template()
MandrillMessage::shouldReceive('sendTemplate')->andReturn([['status' => 'sent']]);

$response = Mail::mandrill()
->to('test@test.com')
->name('Testing')
->templateName('test-template')
->fromEmail('test2@test.com')
->fromName('Testing From')
->subject('Testing')
->to('john@example.com')
->name('John Doe')
->templateName('template-name')
->fromEmail('no-reply@example.com')
->fromName('Example Website')
->subject('Hello Mandrill')
->send();

$this->assertTrue($response[0]['status'] == 'sent');
Expand Down

0 comments on commit 82a9ddc

Please sign in to comment.