PHP code example of codewiser / laravel-sendsay-mailer

1. Go to this page and download the library: Download codewiser/laravel-sendsay-mailer 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/ */

    

codewiser / laravel-sendsay-mailer example snippets


'sendsay' => [
    'transport' => 'sendsay',
    'endpoint' => env('SENDSAY_URL', 'https://api.sendsay.ru/general/api/v100/json'),
    'login' => env('SENDSAY_LOGIN'),
    'password' => env('SENDSAY_PASS'),
    'sub_login' => env('SENDSAY_SUBLOGIN', ''),
],

use \Illuminate\Support\Facades\Mail;

$recipients = [
    '[email protected]',
    '[email protected]',
];

Mail::send(new CustomMailable($recipients));

use \Illuminate\Support\Facades\Mail;
use \Illuminate\Mail\Events\MessageSent;

$recipients = [
    '[email protected]',
    '[email protected]',
];

Event::listen(MessageSent::class, function (MessageSent $event) {
    // json encoded response
    dump($event->sent->getDebug());
});

Mail::send(new CustomMailable($recipients));