2017 © Pedro Peláez
 

molajo-package email

Molajo Email: platform independent support with adapters for PHPMailer, SwiftMail, and native PHP mail

image

molajo/email

Molajo Email: platform independent support with adapters for PHPMailer, SwiftMail, and native PHP mail

  • PHP
  • 2 Dependents
  • 1 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

=======, (*1)

Email Package

Build Status, (*2)

Email Services API for PHP applications enabling interaction with multiple Email types (ex., PHP Mail, PHP Mailer, Swiftmailer, etc.)., (*3)

At a glance ...

  1. Instantiate a Mail Handler.
  2. Instantiate the Adapter, injecting it with the Handler.
  3. Set mail parameters.
  4. Send mail.

// 1. Instantiate an Email Handler. $options = array(); $options['mailer_transport'] = 'mail'; $options['site_name'] = 'Sitename'; $options['Fieldhandler'] = new Fieldhandler(); $class = 'Molajo\\Email\\Handler\\PhpMailer'; $handler = new $class($options); // 2. Instantiate the Adapter, injecting it with the Handler. $class = 'Molajo\\Email\\Adapter'; $this->adapter = new $class($handler); // 3. Set email parameters $this->adapter->set('to', 'AmyStephen@Molajo.org,Fname Lname'); $this->adapter->set('from', 'AmyStephen@Molajo.org,Fname Lname'); $this->adapter->set('reply_to', 'AmyStephen@Molajo.org,FName LName'); $this->adapter->set('cc', 'AmyStephen@Molajo.org,FName LName'); $this->adapter->set('bcc', 'AmyStephen@Molajo.org,FName LName'); $this->adapter->set('subject', 'Welcome to our Site'); $this->adapter->set('body', 'Stuff goes here'); $this->adapter->set('mailer_html_or_text', 'text'); // 4. Send Email. $this->adapter->send();

Install using Composer from Packagist

Step 1: Install composer in your project

    curl -s https://getcomposer.org/installer | php

Step 2: Create a composer.json file in your project root

{
    "require": {
        "Molajo/Email": "1.*"
    }
}

Step 3: Install via composer

    php composer.phar install

Requirements and Compliance

  • PHP framework independent, no dependencies
  • Requires PHP 5.4, or above
  • Semantic Versioning
  • Compliant with:
  • [phpDocumentor2] (https://github.com/phpDocumentor/phpDocumentor2)
  • [phpUnit Testing] (https://github.com/sebastianbergmann/phpunit)
  • Author AmyStephen
  • [Travis Continuous Improvement] (https://travis-ci.org/profile/Molajo)
  • Listed on [Packagist] (http://packagist.org) and installed using [Composer] (http://getcomposer.org/)
  • Use github to submit pull requests and features
  • Licensed under the MIT License - see the LICENSE file for details

The Versions

31/08 2015

dev-master

9999999-dev http://github.com/Molajo/Email

Molajo Email: platform independent support with adapters for PHPMailer, SwiftMail, and native PHP mail

  Sources   Download

MIT

The Requires

 

email phpmailer molajo swiftmail

07/04 2014

v0.4

0.4.0.0 http://github.com/Molajo/Email

Molajo Email: platform independent support with adapters for PHPMailer, SwiftMail, and native PHP mail

  Sources   Download

MIT

The Requires

 

email phpmailer molajo swiftmail

01/02 2014

v0.3

0.3.0.0 http://github.com/Molajo/Email

Molajo Email: platform independent support with adapters for PHPMailer, SwiftMail, and native PHP mail

  Sources   Download

MIT

The Requires

 

email phpmailer molajo swiftmail

03/01 2014

v0.2

0.2.0.0 http://github.com/Molajo/Email

Molajo Email: platform independent support with adapters for PHPMailer, SwiftMail, and native PHP mail

  Sources   Download

MIT

The Requires

 

email phpmailer molajo swiftmail