1. Go to this page and download the library: Download vercy/sendbyte-laravel 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/ */
// Plain text
Mail::mailer('sendbyte')->raw('Your order has shipped.', function ($message) {
$message->to('[email protected]')
->from('[email protected]')
->subject('Shipping update');
});
// HTML
Mail::mailer('sendbyte')->html('<h4>Order shipped</h4><p>Track it here.</p>', function ($message) {
$message->to('[email protected]')
->from('[email protected]')
->subject('Shipping update');
});
use Sendbyte\Laravel\Events\EmailDelivered;
use Sendbyte\Laravel\Events\EmailBounced;
use Sendbyte\Laravel\Events\EmailComplained;
use Sendbyte\Laravel\Events\SendbyteWebhookReceived;
protected $listen = [
EmailDelivered::class => [MarkReceiptDelivered::class],
EmailBounced::class => [SuppressBouncedAddress::class],
EmailComplained::class => [SuppressBouncedAddress::class],
// Or catch everything in one place:
SendbyteWebhookReceived::class => [LogSendbyteEvent::class],
};