PHP Class Pommo_Mta, poMMo

Exibir arquivo 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_oe property

security code - prevent oustide interferrence
public $_code

$_failed public_oe property

public $_failed

$_hash public_oe property

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

$_id public_oe property

The ID of the current mailing
public $_id

$_mailer public_oe property

the poMMo mailer
public $_mailer

$_mailing public_oe property

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

$_maxRunTime public_oe property

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

$_queue public_oe property

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

$_queueSize public_oe property

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

$_sent public_oe property

public $_sent

$_serial public_oe property

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

$_skipSecurity public_oe property

(bool) Skip Security checks
public $_skipSecurity

$_start public_oe property

Time the MTA process began
public $_start

$_test public_oe property

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

$_throttler public_oe property

the throttle object
public $_throttler