PHP code example of camuthig / courier-postmark
1. Go to this page and download the library: Download camuthig/courier-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/ */
camuthig / courier-postmark example snippets
use Courier\SendGridCourier;
use PhpEmail\EmailBuilder;
use PhpEmail\Content\SimpleContent;
$courier = new PostmarkCourier(new PostmarkClient(getenv('POSTMARK_KEY')));
$email = EmailBuilder::email()
->withSubject('Welcome!')
->withContent(SimpleContent::text('Start your free trial now!!!'))
->from('[email protected]')
->to('[email protected]')
->build();
$courier->deliver($email);