2017 © Pedro Peláez
 

library minibase-plugin-mailer

This plugin adds easy mailing support for Minibase applications. Uses SwiftMailer library.

image

pkj/minibase-plugin-mailer

This plugin adds easy mailing support for Minibase applications. Uses SwiftMailer library.

  • Tuesday, April 30, 2013
  • by peec
  • Repository
  • 1 Watchers
  • 0 Stars
  • 10 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Mailer Plugin for Minibase

Adds mailing support for Minibase application. Uses the Swiftmailer library to send emails. Easy to configure to forexample use gmail as SMTP server., (*1)

Install

{
  "require":{
         "pkj/minibase-plugin-mailer": "dev-master"
    }
}

Setup

Init the plugin, (*2)

$mb->initPlugins(array(
    'Pkj\Minibase\Plugin\MailerPlugin\MailerPlugin' => array(
        // This configures Swiftmailer to use Gmail as smtp.
        'transport' => 'smtp',
        'encryption' => 'ssl',
        'auth_mode' => 'login',
        'host' => 'smtp.gmail.com',
        'username' => 'your gmail username',
        'password' => 'your gmail password'
    )
));

Possible configuration keys:

  • transport (smtp, mail, sendmail, loadbalanced or failover)
  • username
  • password
  • host
  • port
  • encryption (tls, or ssl)
  • auth_mode (plain, login, or cram-md5)
  • sendmailCommand (if using sendmail transport, you can customize the default command /usr/sbin/sendmail -bs)
  • mailParams (if you want to customize the mailparams, used by the mail transport -f%s)
  • transports (array of transport configuratioins, used by loadbalanced and failover transport.)

Send emails.

You can send emails from forexample controllers (note $this->mb):, (*3)

$message = \Swift_Message::newInstance()
        ->setSubject('Hello Email')
        ->setFrom('send@example.com')
        ->setTo('recipient@example.com')
        ->setBody("Hello World!");

$this->mb->mailer->send($message);

The Versions

30/04 2013

dev-master

9999999-dev http://github.com/peec/minibase-plugin-mailer

This plugin adds easy mailing support for Minibase applications. Uses SwiftMailer library.

  Sources   Download

MIT

The Requires