PHP code example of jegex / sendmail

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

    

jegex / sendmail example snippets


// routes/api.php
Route::middleware(['auth:sanctum'])->group(function () {
    Sendmail::apiRoutes();
});

Sendmail::publicApiRoutes();

// routes/web.php
Sendmail::publicWebRoutes();

public function boot(): void
{
    Sendmail::setCurrentWorkspaceIdResolver(fn () => 1);
}
bash
php artisan vendor:publish --tag="sendmail-migrations"
php artisan migrate
bash
php artisan vendor:publish --tag="sendmail-config"