https://github.com/rdanusha/laravelelasticemail
A Laravel wrapper for Elastic Email. Can send emails with multiple attachments
https://github.com/rdanusha/laravelelasticemail
api attachment attachments elastic elasticemail email file laravel laravel-5-package laravel-mail-assertions mail module multiple php plugin send sendemail sendmail support wrapper
Last synced: 5 months ago
JSON representation
A Laravel wrapper for Elastic Email. Can send emails with multiple attachments
- Host: GitHub
- URL: https://github.com/rdanusha/laravelelasticemail
- Owner: rdanusha
- Created: 2017-08-30T06:48:15.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2019-07-12T15:32:27.000Z (almost 7 years ago)
- Last Synced: 2024-07-09T03:18:47.616Z (almost 2 years ago)
- Topics: api, attachment, attachments, elastic, elasticemail, email, file, laravel, laravel-5-package, laravel-mail-assertions, mail, module, multiple, php, plugin, send, sendemail, sendmail, support, wrapper
- Language: PHP
- Homepage: https://packagist.org/packages/rdanusha/laravel-elastic-email
- Size: 19.5 KB
- Stars: 11
- Watchers: 2
- Forks: 17
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Laravel Elastic Email #
A Laravel wrapper for Elastic Email
Can send emails with multiple attachments
## IMPORTANT
### Laravel version
**5.5** or older - Use Version 1.1.1
**5.6** and forwards - Use version 1.2
### Installation ###
* Step 1
Install package via composer
```bash
composer require rdanusha/laravel-elastic-email
```
* Step 2
Add this code to **.env file**
```
ELASTIC_ACCOUNT=
ELASTIC_KEY=
```
* Step 3
Update **MAIL_DRIVER** value as 'elastic_email' in your **.env file**
```
MAIL_DRIVER=elastic_email
```
* Step 4
Add this code to your **config/services.php** file
```
'elastic_email' => [
'key' => env('ELASTIC_KEY'),
'account' => env('ELASTIC_ACCOUNT')
]
```
* Step 5
Open **config/app.php** file and go to providers array, Then comment out Laravel's default MailServiceProvider and add the following
```php
'providers' => [
/*
* Laravel Framework Service Providers...
*/
...
// Illuminate\Mail\MailServiceProvider::class,
Rdanusha\LaravelElasticEmail\LaravelElasticEmailServiceProvider::class,
...
],
```
### Usage ###
This package works exactly like Laravel's native mailers. Refer to Laravel's Mail documentation.
https://laravel.com/docs/5.5/mail
### Code Example ###
```php
Mail::to($request->user())->send(new OrderShipped($order));
```