LaravelPackages.net
Acme Inc.
Toggle sidebar
bingooo/laravel-submail

25
2
About bingooo/laravel-submail

bingooo/laravel-submail is a Laravel package. It currently has 2 GitHub stars and 25 downloads on Packagist. Install it with composer require bingooo/laravel-submail. Discover more Laravel packages by bingooo or browse all Laravel packages to compare alternatives.

Last updated

Laravel-SubMail

composer require bingooo/laravel-submail

config/app.php

'providers' => [
    Bingooo\Mail\SubMailServiceProvider::class,
];

.env

MAIL_DRIVER=submail

SUBMAIL_APPID=
SUBMAIL_APPKEY=

Normal

Mail::send('emails.welcome', $data, function ($message) {
    $message->from('[email protected]', 'XXXXX');
    $message->to('[email protected]')->cc('[email protected]');
});

Use template:

$vars = ['name' => 'hi','link_text' => 'http://example.com'];
$links = ['link' => 'http://example.com'];
$template = new Bingooo\Mail\SubMailTemplate('XXXXX', $vars, $links);
\Mail::raw($template,function($message){
  $message->from('[email protected]', 'XXXXX');
  $message->to('[email protected]');
});
Comments