LaravelPackages.net
Acme Inc.
Toggle sidebar
megaads/laravel-mailservice

This package support call to api for sent email

15
0
v1.0.1
About megaads/laravel-mailservice

megaads/laravel-mailservice is a Laravel package for this package support call to api for sent email. It currently has 0 GitHub stars and 15 downloads on Packagist (latest version v1.0.1). Install it with composer require megaads/laravel-mailservice. Discover more Laravel packages by megaads or browse all Laravel packages to compare alternatives.

Last updated

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);

Star History Chart