2017 © Pedro Peláez
 

library mail-postmarkapp

PostMarkApp Support for Abstract Mail Component

image

centralapps/mail-postmarkapp

PostMarkApp Support for Abstract Mail Component

  • Saturday, April 12, 2014
  • by mkpeacock
  • Repository
  • 1 Watchers
  • 2 Stars
  • 1,130 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

PostmarkApp Mail Component for Abtract Mail Component

This is the postmarkapp integration for the centralapps\mail component, an abstract mail sending and receiving component., (*1)

Created by Michael Peacock, (*2)

Installation

Using Composer

  1. Add to your composer.json file, (*3)

    { "require": { "centralapps/mail": "dev-master", "centralapps/mail-postmarkapp": "dev-master" } }, (*4)

  2. Download composer, (*5)

    curl -s https://getcomposer.org/installer | php, (*6)

  3. Install the dependencies, (*7)

    php composer.phar install, (*8)

Usage

<?php
require_once( __DIR__ . '/../vendor/autoload.php');

// Configs & Create a mail transportation layer and a dispatcher
$configuration = new \CentralApps\PostMarkApp\Configuration();
$configuration['api_key'] = "YOUR POSTMARKAPP API KEY GOES HERE";
$transport = new \CentralApps\PostMarkApp\Transport($configuration);
$dispatcher = new \CentralApps\Mail\Dispatcher($transport);

// Create a sender
$sender = new \CentralApps\Mail\SendersReceiversEtc\Sender("sender@domain.com", "Sender Name");
// Create a recipient
$recipient = new \CentralApps\Mail\SendersReceiversEtc\Recipient("recipient@domain.com", "Recipient Name");

// Create a message
$message = new \CentralApps\PostMarkApp\Message();
$message->setSender($sender);
$message->addRecipient($recipient);
$message->setSubject('Subject');
$message->setPlainTextMessage("Hi there");

// Send the message
$dispatcher->send($message);

The Versions

12/04 2014

dev-master

9999999-dev

PostMarkApp Support for Abstract Mail Component

  Sources   Download

The Requires

 

mail email postmarkapp

12/04 2014

v1.0.1

1.0.1.0

PostMarkApp Support for Abstract Mail Component

  Sources   Download

The Requires

 

mail email postmarkapp

01/03 2014

v1.0.0

1.0.0.0

PostMarkApp Support for Abstract Mail Component

  Sources   Download

The Requires

 

mail email postmarkapp