PHP Class Pommo_Mta, poMMo

Show file Open project: soonick/poMMo Class Usage Examples

Public Properties

Property Type Description
$_code security code - prevent oustide interferrence
$_failed
$_hash the email hash array('email' => 'subscriber_id')
$_id The ID of the current mailing
$_mailer the poMMo mailer
$_mailing the current mailing (object) body, serial, code, etc!
$_maxRunTime Number of seconds the MTA process is allowed to run for.
$_queue the current queue, holds an array of subscriber objects
$_queueSize Attempted number of mails to process per queue batch.
$_sent
$_serial serial of mailing, prevents 2 scripts from working on the same mailing
$_skipSecurity (bool) Skip Security checks
$_start Time the MTA process began
$_test (bool) True if this is a test mailing
$_throttler the throttle object

Public Methods

Method Description
Pommo_Mta ( $args = [] ) Register function that will be called when the script terminates abruptly.
attach ( $name, &$obj )
poll ( ) Retrieves the current command from the DB and acts based on that.
processQueue ( ) continually sends mails from the queue until mailing completes or max runtime reached
pullQueue ( ) Verify if there are still subscribers to whom the mailing hasn't been sent. If there aren't, stop. If there are: Get some subscribers from the DB.
pushThrottler ( ) pushes queue into throttler
shutdown ( $msg = false, $destroy = true )
stop ( $finish = false )
update ( ) accepts a array of sent emails

Method Details

Pommo_Mta() public method

Get code, test and id from URL. Retrieve mailing (subject, body, attachments, etc) that will be sent.
public Pommo_Mta ( $args = [] )

attach() public method

public attach ( $name, &$obj )

poll() public method

restart: Set command to "none" in the DB.
public poll ( )

processQueue() public method

continually sends mails from the queue until mailing completes or max runtime reached
public processQueue ( )

pullQueue() public method

Verify if there are still subscribers to whom the mailing hasn't been sent. If there aren't, stop. If there are: Get some subscribers from the DB.
public pullQueue ( )

pushThrottler() public method

pushes queue into throttler
public pushThrottler ( )

shutdown() public method

public shutdown ( $msg = false, $destroy = true )

stop() public method

public stop ( $finish = false )

update() public method

accepts a array of sent emails
public update ( )

Property Details

$_code public property

security code - prevent oustide interferrence
public $_code

$_failed public property

public $_failed

$_hash public property

the email hash array('email' => 'subscriber_id')
public $_hash

$_id public property

The ID of the current mailing
public $_id

$_mailer public property

the poMMo mailer
public $_mailer

$_mailing public property

the current mailing (object) body, serial, code, etc!
public $_mailing

$_maxRunTime public property

Number of seconds the MTA process is allowed to run for.
public $_maxRunTime

$_queue public property

the current queue, holds an array of subscriber objects
public $_queue

$_queueSize public property

Attempted number of mails to process per queue batch.
public $_queueSize

$_sent public property

public $_sent

$_serial public property

serial of mailing, prevents 2 scripts from working on the same mailing
public $_serial

$_skipSecurity public property

(bool) Skip Security checks
public $_skipSecurity

$_start public property

Time the MTA process began
public $_start

$_test public property

(bool) True if this is a test mailing
public $_test

$_throttler public property

the throttle object
public $_throttler