PHP code example of hsntngr / laravel-jetmail

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

    

hsntngr / laravel-jetmail example snippets


JetMail::to('[email protected]')
    ->send(new Welcome('Teoman'));

'providers' => [
   //...
   Hsntngr\JetMail\JetMailServiceProvider::class,
   //...
]

php artisan vendor:publish --provider="Hsntngr\JetMail\JetMailServiceProvider" --tag=config

'from' => [
    'address' => '[email protected]',
    'name' => 'Laravel',
],

'auth' => [
    'token' => 'jetmailtarafındanverilentoken',
    'username' => 'hsntngr'
],

php artisan make:jetmail Welcome

public function build()
   {
      return $this
          ->replyTo('[email protected]')
          ->subject('Hoşgeldin ' . $this->user)
          ->view('email.welcome');
   }

use App\Mail\Welcome;
use Hsntngr\JetMail\Facade\JetMail;


JetMail::send(new Welcome('Teoman'))

JetMail::to('[email protected]')
    ->send(new Welcome('Teoman'))