PHP code example of laraben / laravel-postmark

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

    

laraben / laravel-postmark example snippets


MAIL_DRIVER=postmark
POSTMARK_SECRET=YOUR-SERVER-KEY-HERE

public function toMail($notifiable)
{
    return (new \Coconuts\Mail\MailMessage)
        ->identifier(8675309)
        ->

public function build()
{
    $this->withSwiftMessage(function (\Swift_Message $message) {
        $message->getHeaders()->addTextHeader('tag', 'value');
    });
}

public function build()
{
    $this->withSwiftMessage(function (\Swift_Message $message) {
        $message->getHeaders()->addTextHeader('metadata-field', 'value');
        $message->getHeaders()->addTextHeader('metadata-another-field', 'another value');
    });
}
bash
php artisan vendor:publish --provider="Coconuts\Mail\PostmarkServiceProvider" --tag="config"