PHP code example of alezhu / laravel-notisend

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

    

alezhu / laravel-notisend example snippets


$mailer = Mail::mailer('notisend');

'notisend' => [
    'transport' => 'notisend',
],

 'mailers' => [
    ...
    'notisend' => [
        'transport' => 'notisend',
        'api_token' => env('NOTISEND_API_TOKEN'),
        'host' => env('NOTISEND_API_HOST', 'https://api.notisend.ru/v1'),
        'payment' => env('NOTISEND_PAYMENT', 'credit_priority'),    
    ],
    ...
  ]

use Illuminate\Mail\Message;
use Illuminate\Support\Facades\Mail;
use Tests\TestCase;

class ExampleTestManual extends TestCase
{
    /**
     * A basic test example.
     */
    public function test_notisend(): void
    {
        Mail::mailer('notisend')
            ->raw('Test mail', function (Message $message) {
            $message->to('[email protected]');
            $message->subject('Test mail');
        });
    }
}
bash
php artisan vendor:publish --tag=notisend-config