Public Member Functions |
| markEmailsForCron (array $options) |
| resetFailed (array $options) |
| removeMail (array $options) |
| runQueue (array $options, $limit, $test, $sendFailed=false, $overrideTo=false) |
| Sends emails in Queue datatable.
|
| addMail (KDB_Driver $db, $queue, $requestId, $emailFrom, $emailTo, $title, $plain, $html, $headers=null, $attachments=null, $lang=null, $allowCron=true, $priority=0, $sendAfter=null, $sendBefore=null) |
| Adds email to the queue.
|
Static Public Member Functions |
static | instance ($create=true) |
static | runCron ($limit, $sendFailed=false, array $options=array()) |
static | runCleanup ($mailExpireDays=true) |
Data Fields |
const | OPT_QUEUE = "queue" |
const | OPT_REQUEST = "request" |
const | OPT_CRONALLOWED = "cron" |
const | OPT_TIMELIMIT = "timelimit" |
const | OPT_WITH_EMAILTO = "with_email_to" |
Static Public Attributes |
static | $inst = null |
Protected Member Functions |
| __construct () |
| buildSqlWhereFromOptions ($options) |
| createMailSender () |
Constructor & Destructor Documentation
KMailQueue::__construct |
( |
| ) |
[protected] |
Member Function Documentation
KMailQueue::addMail |
( |
KDB_Driver $ |
db, |
|
|
$ |
queue, |
|
|
$ |
requestId, |
|
|
$ |
emailFrom, |
|
|
$ |
emailTo, |
|
|
$ |
title, |
|
|
$ |
plain, |
|
|
$ |
html, |
|
|
$ |
headers = null , |
|
|
$ |
attachments = null , |
|
|
$ |
lang = null , |
|
|
$ |
allowCron = true , |
|
|
$ |
priority = 0 , |
|
|
$ |
sendAfter = null , |
|
|
$ |
sendBefore = null |
|
) |
| |
Adds email to the queue.
- Parameters:
-
$queue | Queue identifier |
$requestId | Request identifier (queue specific) |
$emailFrom | |
$emailTo | |
$title | |
$plain | Plain text body (optional) |
$html | HTML body (optional) |
$headers | Additional headers as Name: Value\n |
$attachments | Serialized information about attachmetns. See KMail |
$lang | Language identifier of the email |
$allowCron | Allow to send this email automatically |
$priority | Priority of the email in queue. Emails are sent in descending order |
$sendBefore | Unix time after which the email is invalidated |
$sendAfter | Unix time after which the email will be sent |
KMailQueue::buildSqlWhereFromOptions |
( |
$ |
options | ) |
[protected] |
KMailQueue::createMailSender |
( |
| ) |
[protected] |
static KMailQueue::instance |
( |
$ |
create = true | ) |
[static] |
KMailQueue::markEmailsForCron |
( |
array $ |
options | ) |
|
KMailQueue::removeMail |
( |
array $ |
options | ) |
|
KMailQueue::resetFailed |
( |
array $ |
options | ) |
|
static KMailQueue::runCleanup |
( |
$ |
mailExpireDays = true | ) |
[static] |
static KMailQueue::runCron |
( |
$ |
limit, |
|
|
$ |
sendFailed = false , |
|
|
array $ |
options = array() |
|
) |
| [static] |
KMailQueue::runQueue |
( |
array $ |
options, |
|
|
$ |
limit, |
|
|
$ |
test, |
|
|
$ |
sendFailed = false , |
|
|
$ |
overrideTo = false |
|
) |
| |
Sends emails in Queue datatable.
- Parameters:
-
$db | Database connection |
$options | |
$limit | Maximum emails sent in one batch |
$test | if TRUE email won't be marked as sent in the database |
$sendFailed | if TRUE will try to resend previously failed emails |
$overrideTo | recipient email address will be overriden by this setting |
Field Documentation
KMailQueue::$inst = null [static] |
The documentation for this class was generated from the following file: