A full featured postmark transport for Swiftmailer, allowing attachments, html emails / parts, cc, bcc and sending multiple emails with one api call.
$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);
Define Postmark Transport as service:
services:
swift_transport.postmark:
class: Openbuildings\Postmark\Swift_PostmarkTransport
arguments:
- POSTMARK_API_KEY
In config.yml change transport to defined service:
swiftmailer:
transport: swift_transport.postmark
Copyright (c) 2012-2013, OpenBuildings Ltd. Developed by Ivan Kerin as part of clippings.com
Under BSD-3-Clause license, read LICENSE file.