PHP code example of tomahock / laravel-cloudflare-mail
1. Go to this page and download the library: Download tomahock/laravel-cloudflare-mail 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/ */
tomahock / laravel-cloudflare-mail example snippets
'mailers' => [
'cloudflare' => [
'transport' => 'cloudflare',
],
],
use Illuminate\Support\Facades\Mail;
use App\Mail\WelcomeMail;
Mail::to('[email protected]')->send(new WelcomeMail());
Mail::raw('Hello World', function ($message) {
$message->to('[email protected]')
->from('[email protected]', 'Your App')
->subject('Hello');
});
bash
php artisan vendor:publish --tag=cloudflare-mail-config