PHP code example of ashraful19 / laravel-mailbridge
1. Go to this page and download the library: Download ashraful19/laravel-mailbridge library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
use Ashraful19\LaravelMailbridge\Data\Subscriber;
MailBridge::marketing()
->list('signup')
->subscribe(Subscriber::make($user->email)->name($user->name));
$result = MailBridge::transactional()
->to($user->email)
->subject('Welcome')
->text('Hello')
->send();
$result->provider; // string, selected provider name
$result->messageId; // ?string, provider message id when available
$result->metadata; // array, provider-specific extra data