### Installing Laravel Postmark Provider via Composer Source: https://github.com/activecampaign/laravel-postmark-provider/blob/main/README.md This command installs the legacy `wildbit/laravel-postmark-provider` package into a Laravel project using Composer. This package is for older Laravel versions (up to 5.2) and is no longer actively maintained. ```Bash composer require wildbit/laravel-postmark-provider ``` -------------------------------- ### Adding Postmark Service Configuration in Laravel Source: https://github.com/activecampaign/laravel-postmark-provider/blob/main/README.md This snippet adds the Postmark service configuration to Laravel's `config/services.php` file. It retrieves the Postmark token from the environment variables, linking the service to the previously defined `POSTMARK_TOKEN`. ```PHP 'postmark' => env('POSTMARK_TOKEN'), ``` -------------------------------- ### Defining Postmark Server Token in Laravel .env Source: https://github.com/activecampaign/laravel-postmark-provider/blob/main/README.md This snippet shows how to define the Postmark server token in the Laravel `.env` file. This token is used by the legacy Postmark provider for authentication with the Postmark API. ```Plaintext POSTMARK_TOKEN= ``` -------------------------------- ### Replacing Laravel Mail Service Provider Source: https://github.com/activecampaign/laravel-postmark-provider/blob/main/README.md This snippet shows the line that replaces `Illuminate\Mail\MailServiceProvider` in `config/app.php`. This change registers the legacy Postmark provider as the primary mail service provider for the Laravel application. ```PHP 'Postmark\Adapters\LaravelMailProvider', ``` -------------------------------- ### Configuring Laravel Mail for Postmark SMTP Source: https://github.com/activecampaign/laravel-postmark-provider/blob/main/README.md This snippet updates the `config/mail.php` file to use Postmark via SMTP. It sets the host, port, encryption, and driver, and includes placeholders for Postmark server tokens as username and password. It also notes the requirement for a valid Sender Signature for the 'from' address. ```PHP env(''), 'password' => env(''), 'host' => env('MAIL_HOST', 'smtp.postmarkapp.com'), // Optionally, set "smtp" to "log" if you want to trap emails during testing. 'driver' => env('MAIL_DRIVER', 'smtp'), 'port' => env('MAIL_PORT', 587), 'encryption' => env('MAIL_ENCRYPTION', 'tls'), /* |-------------------------------------------------------------------------- | Global "From" Address |-------------------------------------------------------------------------- | | You may wish for all e-mails sent by your application to be sent from | the same address. Here, you may specify a name and address that is | used globally for all e-mails that are sent by your application. | | It is also OK to not set this from address here and specify it on each message. | | Remember, when using Postmark, the sending address must be a valid | Sender Signature that you have already configured. */ 'from' => ['address' => null, 'name' => null], ]; ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.