Public Member Functions | Public Attributes | Protected Member Functions

BeMailComponent Class Reference

General BEdita mail component. More...

List of all members.

Public Member Functions

 startup (&$controller=null)
 startup component set smtp options if it's in configuration (bedita.cfg.php)
 sendMailById ($msg_id, $to, $html=true)
 send single mail from mail_messages table
 sendMail ($data=array(), $createLog=true)
 send single mail from $data array
 lockMessages ()
 set to "injob" messages with status=pending and start_sending <= now
 createJobs (array $msgIds)
 create jobs from message with status "injob"
 sendQueuedJobs (array $msgIds)
 execute active jobs
 notify ($timeout=20)
 Send notification mail and save mail job data Try to send all "unsent" notifications and all "pending" notifications stayed in queue too much time (see $timeout param).
 getMessagesBlocked ($timeout=20)
 return array of messages that result blocked and update pid of mail jobs blocked

Public Attributes

 $components = array("Email")

Protected Member Functions

 setSmtpOptions ()
 if available set smtp options to EmailComponent

Detailed Description

General BEdita mail component.

Version:
$Revision$ $LastChangedBy$ $LastChangedDate$

$Id$

Definition at line 31 of file be_mail.php.


Member Function Documentation

BeMailComponent::createJobs ( array $  msgIds  ) 

create jobs from message with status "injob"

Parameters:
array $msgIds

Definition at line 239 of file be_mail.php.

BeMailComponent::getMessagesBlocked ( timeout = 20  ) 

return array of messages that result blocked and update pid of mail jobs blocked

Parameters:
int $timeout, time in minute for check when a message is considered blocked
Returns:
array of message ids

Definition at line 471 of file be_mail.php.

BeMailComponent::lockMessages (  ) 

set to "injob" messages with status=pending and start_sending <= now

Returns:
array $msgIds

Definition at line 210 of file be_mail.php.

BeMailComponent::notify ( timeout = 20  ) 

Send notification mail and save mail job data Try to send all "unsent" notifications and all "pending" notifications stayed in queue too much time (see $timeout param).

Parameters:
$timeout,time in minute for check when a message is considered blocked (it has to resend)

Definition at line 411 of file be_mail.php.

BeMailComponent::sendMail ( data = array(),
createLog = true 
)

send single mail from $data array

Parameters:
array $data

Definition at line 171 of file be_mail.php.

Referenced by sendMailById(), and sendQueuedJobs().

BeMailComponent::sendMailById ( msg_id,
to,
html = true 
)

send single mail from mail_messages table

Parameters:
int $msg_id
string $to, recipient email
bool $html

Definition at line 65 of file be_mail.php.

References sendMail().

BeMailComponent::startup ( &$  controller = null  ) 

startup component set smtp options if it's in configuration (bedita.cfg.php)

Parameters:
unknown_type $controller

Definition at line 46 of file be_mail.php.


The documentation for this class was generated from the following file:
Generated on Fri Dec 11 2015 15:29:46 by Doxygen 1.7.1  BEditaBEdita 3.7 Corylus