2017 © Pedro Peláez
 

cakephp-plugin cakephp-mailqueue-plugin

Plugin to store mail in a queue for later sendout

image

hakito/cakephp-mailqueue-plugin

Plugin to store mail in a queue for later sendout

  • Saturday, September 13, 2014
  • by hakito
  • Repository
  • 3 Watchers
  • 6 Stars
  • 94 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

CakePHP-Mailqueue-Plugin

Build Status Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

CakePHP 5.x plugin to store mail in a queue for later sendout., (*2)

When working with emails on a webservice sending email blocks the http request until the email is actually sent out. This can be frustrating for a user especially if the smtp server does not respond promptly., (*3)

With this plugin you can save the mail to a local queue file and invoke the actual transport for example with a cron fired cake shell command., (*4)

Installation

If you are using composer simply add it with:, (*5)

composer require hakito/cakephp-mailqueue-plugin

Otherwise download the plugin to app/Plugin/Mailqueue., (*6)

Load the plugin in your bootstrap method, (*7)

$this->addPlugin('MailQueue');

Configuration

Add a transport entry to your app_local.php, (*8)

'EmailTransport' => [
    'MailQueue' => [
        // required
        'className' => \MailQueue\Mailer\Transport\QueueTransport::class,
        'queueFolder' => TMP . 'mailqueue', // storage location for mailqueue

        // optional:
        'requeue' => [300, 500, 1000] // requeue after x seconds in case of an error
    ]
],

'Email' => [
    'default' => [
        'transport' => 'MailQueue',
    ],
    'smtp' => [
        // configure your real mailer here
    ]
]

Queue a mail

Send mail to the queue as usually in cake, (*9)

$mailer = new Mailer('default');
// place your content in $email
$mailer->deliver();

Do the real sendout

Use cake shell to do the real sendout. The shell script requires 2 arguments. The first is the name of your queue configuration and the second the name of the config to use for the real sendout., (*10)

In your app directory execute:, (*11)

bin/cake MailQueue SendMail smtp

The Versions

13/09 2014

dev-master

9999999-dev https://github.com/hakito/CakePHP-Mailqueue-Plugin

Plugin to store mail in a queue for later sendout

  Sources   Download

GPL-2.0

The Requires

  • php >=5.3.0

 

email cakephp queue

13/09 2014

v1.2

1.2.0.0 https://github.com/hakito/CakePHP-Mailqueue-Plugin

Plugin to store mail in a queue for later sendout

  Sources   Download

GPL-2.0

The Requires

  • php >=5.3.0

 

email cakephp queue