Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/megaads-vn/laravel-mailservice
https://github.com/megaads-vn/laravel-mailservice
Last synced: 10 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/megaads-vn/laravel-mailservice
- Owner: megaads-vn
- License: mit
- Created: 2018-12-24T21:54:03.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-05-03T02:53:15.000Z (over 5 years ago)
- Last Synced: 2024-04-24T05:03:12.011Z (9 months ago)
- Language: PHP
- Size: 3.91 KB
- Stars: 0
- Watchers: 7
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Laravel MailService Module
## Installation & Configuration
```
composer require megaads/laravel-mailservice
```After require module success, register module on config app.
```
Megaads\Laravelmailservice\LaravelmailserviceServiceProvider::class
```
If using lumen, register class module on ``` bootstrap/app.php ```. Then add some param config to env file
```
EMAIL_SERVICE_URL=
EMAIL_SERVICE_USER=
EMAIL_SERVICE_PASSWORD=
```
### Using
On constructor function, declare email service.
```
$this->emailService = $this->app->make('sendEmailService');
```Create send options email like below
```
$options = [
'to' => 'email1, email2, email3' // if not service using group param
'group' => 'technical', // if not service using to params
'content' => 'Hello World', // text string or laravel view html render
'subject' => 'Send test email',
'name' => 'Joe Smith',
]
```
Finally call service to send email and waiting for result.
```
$this->emailService->sendMail($options);
```