openbuildings / postmark
Swiftmailer Transport Class for Postmark
Installs: 352 907
Dependents: 5
Suggesters: 1
Security: 0
Stars: 16
Watchers: 13
Forks: 8
Open Issues: 8
Requires
- php: ^7.1
- lib-curl: *
- swiftmailer/swiftmailer: ^6
Requires (Dev)
- phpunit/phpunit: ^7
Suggests
- openbuildings/swiftmailer-css-inliner: Inline the CSS of your HTML emails
- openbuildings/swiftmailer-filter: Whitelist or blacklist domains or emails from To, Cc and Bcc
- openbuildings/swiftmailer-google-campaign: Append to all email links Google UTM campaign parameters
README
A full featured postmark transport for Swiftmailer, allowing attachments, html emails / parts, cc, bcc and sending multiple emails with one api call.
Usage
$transport = Swift_PostmarkTransport::newInstance('your api key'); $mailer = new Swift_Mailer($transport); $message = new Swift_Message(); // Add stuff to your message $message->setFrom('test@example.com'); $message->setTo('test2@example.com'); $message->setSubject('Test'); $message->setBody('Test Email'); $mailer->send($message);
Usage with Symfony 2
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
License
Copyright (c) 2012-2013, OpenBuildings Ltd. Developed by Ivan Kerin as part of clippings.com
Under BSD-3-Clause license, read LICENSE file.