PHP code example of openbuildings / postmark

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

    

openbuildings / postmark example snippets


$transport = Swift_PostmarkTransport::newInstance('your api key');

$mailer = new Swift_Mailer($transport);
$message = new Swift_Message();

// Add stuff to your message
$message->setFrom('[email protected]');
$message->setTo('[email protected]');
$message->setSubject('Test');
$message->setBody('Test Email');

$mailer->send($message);