PHP code example of fikamessaging / email

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

    

fikamessaging / email example snippets


Mail::to($customer)->send(new PaymentReceipt($payment));
Mail::to($customer)->queue(new PaymentReceipt($payment));
$user->notify(new OrderShipped($order));

// In the mailable's build() method:
$this->withSymfonyMessage(function (\Symfony\Component\Mime\Email $message) use ($order) {
    $message->getHeaders()->addTextHeader('Fika-Idempotency-Key', 'order-receipt:'.$order->id);
});
bash
php artisan config:cache
php artisan queue:restart
# If using Horizon, use php artisan horizon:terminate instead of queue:restart.
bash
php artisan vendor:publish --tag=fika-config
bash
read -rsp 'Fika API key: ' FIKA_API_KEY
echo
export FIKA_API_KEY
bash
php tools/staging-smoke.php --send
bash
unset FIKA_API_KEY