Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/megaads-vn/memail
https://github.com/megaads-vn/memail
Last synced: 10 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/megaads-vn/memail
- Owner: megaads-vn
- License: mit
- Created: 2018-10-12T02:34:39.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-12T09:34:01.000Z (about 6 years ago)
- Last Synced: 2024-04-19T00:43:15.463Z (9 months ago)
- Language: PHP
- Size: 6.84 KB
- Stars: 0
- Watchers: 7
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Laravel 5 Memail
This package for send multiple email in laravel 5
## Install and Configuration
Using composer command
```
composer require megaads/memail
```
After composer install package complete, open file app.php and add below line to `providers`:
```
Megaads\Memail\MemailServiceProvider::class
```
After, add to botton file ``config/mail.php``. It see like this:
```
'config-send-email' => [
'default' => [
'to' => ['[email protected]', '[email protected]'],
'subject' => 'Subject default',
'name' => 'Name default'
],
'groups' => [
'developers' => ['[email protected]', '[email protected]'],
'managers' => ['[email protected]', '[email protected]']
]
]
```Then, config mail info in file ``.env``. It see like this:
```
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
[email protected]
MAIL_PASSWORD=mypassword
MAIL_ENCRYPTION=tls
```
Finally, to call function send email, add this line:
```
use Megaads\Memail\Services\EmailService;
```
and call:
```
EmailService::send($option);
```
``$option`` is array, example:
```
[
'to' => ['first email', 'second email'],
'view' => 'emails.hello', // or 'content' => $content
'data' => $data, // pass to $dataEmail in view
'subject' => 'subject',
'group' => 'developers',
'name' => 'sender name'
]
```