Skip to content
This repository has been archived by the owner on Oct 30, 2020. It is now read-only.

AndreasStokholm/Postmark-PHP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 

Repository files navigation

Postmark-PHP

endorse

My take on a PHP class for sending mails with Postmarkapp.com

The master branch will always contain the latest and most stable release. - I will try not to break anything in here.

Usage

$htmlBody = file_get_contents('http://www.google.com');
$textBody = 'Here the whole of google would have been, if you did HTML!';

$mail = new Postmark('MY_API_KEY');
$mail->setFrom('Me <me@example.com>');
$mail->addTo('you@example.com');
$mail->addTo('yourfriend@example.com', 'cc');
$mail->addTo('yoursecretlover@example.com', 'bcc');
$mail->setSubject('All of google, in your inbox!');
$mail->setTag('Example');
$mail->setBody($htmlBody, $textBody);

$result = $mail->send();

Wanna attach a file? - Easy!

Just call this nifty little thing:

$mail->attachFile('AwesomeFile.txt', '/path/to/my/file.txt');

Just remember Postmark limits you to 10 MB of attachments total. - No matter the number of files.

About

PHP class for sending emails with Postmark

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages