rcrowe/swift_postmark-transport

Send emails with SwiftMailer using Postmark as the transport

dev-master 2013-08-08 08:32 UTC

This package is auto-updated.

Last update: 2020-05-30 00:37:41 UTC


README

Send emails with SwiftMailer using Postmark as the transport.

Original author: Øystein Riiser Gundersen oysteinrg@gmail.com

Forked to github by: Rob Crowe hello@vivalacrowe.com

Package installation

The Postmark transport is provided as Composer package which can be installed by adding the package to your composer.json file:

{
    "require": {
        "rcrowe\Swift_PostmarkTransport": "0.1.*"
    }
}

Usage

$transport = \rcrowe\Swift\Transport\Postmark::newInstance('POSTMARK_API_KEY');
$mailer    = Swift_Mailer::newInstance($transport);

$message = Swift_Message::newInstance('Subjebt')
                ->setFrom('hello@vivalacrowe.com')
                ->setTo('')
                ->setBody('This can be any text from the web app');

$mailer->send($message);