2017 © Pedro Peláez
 

library mailer

Jazz framework mailer component

image

qwant50/mailer

Jazz framework mailer component

  • Saturday, March 5, 2016
  • by qwant50
  • Repository
  • 1 Watchers
  • 0 Stars
  • 19 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Jazz framework mailer component README

Jazz framework mailer component, (*1)

Installation

The preferred way to install this ITCourses framework mailer component is through composer., (*2)

Either run, (*3)

php composer.phar require "qwant50/mailer"

or add, (*4)

"qwant50/mailer": "~3.0.*"

to the require section of your composer.json., (*5)

Usage

1. You MUST to init $config array from the config file path/to/config/mailer.php

return [
    'transport' => 'SmtpTransport',
    'host' => 'smtp.domain.com',
    'port' => 587,
    'smtp_username' => 'username',
    'smtp_password' => 'password',
    'mailFrom' => 'transportMailAddress@domain.com',
    'debug' => 5,  //  0 - disable debug messages
];
use Qwant\Mailer;
use Qwant\Message;

$message = new Message();

$message->addHeader('Error-to', 'example@domain.com')
        ->addHeader('From', 'example@domain.com')
        ->addHeader('To', 'example@domain.com')
        ->addHeader('Subject', 'Text field.');

3. Set body and mailTo fields MUST

$message->setBody('Message's body.');
$message->setMailTo('example@domain.com');

4. Send a message

$mailer = new Mailer($config);

if ($mailer->send($message)) {
    // Success
} else {
    // Error
};

Copyright © 2015-2016, ITCourses, (*6)

The Versions

05/03 2016

dev-master

9999999-dev

Jazz framework mailer component

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sergey Malahov

10/02 2016

3.0.0

3.0.0.0

ITCourses framework mailer component

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sergey Malahov

01/02 2016

2.0.1

2.0.1.0

Mailer module.

  Sources   Download

MIT

by Avatar qwant50

01/02 2016

1.0.2

1.0.2.0

Mailer module.

  Sources   Download

MIT

by Avatar qwant50

29/01 2016

1.0.0

1.0.0.0

Mailer module.

  Sources   Download

by Avatar qwant50