jpiasetz/postmark

Postmark PHP wrapper for PHP 5.4+

Installs: 581

Dependents: 0

Stars: 4

Watchers: 1

Forks: 2

Language: PHP

1.0.0 2013-05-05 04:23 UTC

README

Postmark is an easy to integrate email service. This wrapper allows you use to use the api in your php applications.

Usage

<?php

use Postmark\Message;
use Postmark\Mail;

// create a message
$message = new Message();
$message->setFrom('sender@example.com');
$message->addTo('receiver@example.com');
$message->setSubject('Test');
$message->setTextBody('Hello');

// send message
$mail = new Mail('POSTMARK_API_TEST');
$mail->send($message);

Batch usages

<?php

use Postmark\Message;
use Postmark\Mail;

// create a message
$message = new Message();
$message->setFrom('sender@example.com');
$message->addTo('receiver@example.com');
$message->setSubject('Test');
$message->setTextBody('Hello');

// create an array of messages you want to send
$messages = array($message, $message);

// send message
$mail = new Mail('POSTMARK_API_TEST');
$mail->batchSend($messages);

Author

John Piasetzki - john@piasetzki.name - http://twitter.com/jpiasetz

License

Postmark-PHP is licensed under the MIT License - see the LICENSE file for details