PHP code example of directksa / directmail-mailer

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

    

directksa / directmail-mailer example snippets


   'mailers' => [
       'directmail' => [
           'transport' => 'directmail',
           'host' => env('DIRECTMAIL_HOST', 'directmail.directksa.com'),
           'app_key' => env('DIRECTMAIL_APP_KEY'),
           'app_secret' => env('DIRECTMAIL_APP_SECRET'),
       ],
       // ... your other mailers
   ],
   

   Mail::to('[email protected]')->send(new YourMailable());
   

use Illuminate\Support\Facades\Mail;
use App\Mail\TestEmail;

Mail::to('[email protected]')->send(new TestEmail());
bash
   php artisan directmail:install