App\Core_EmailQueue

Inherited from cmsApplication_List

Protected Attributes

protected $is_composed= false

Protected Methods

protected setEmailServerConfiguration()
Set SCHLIX default email server config. You can override this in your own derived class
protected booleansetupMailStorageFolderForEmailID(type $id)
create email storage folder if not exists

Public Methods

public __construct()
Constructor
public html2text($html, $advanced=false)
public sendEmailToUserByUserObject($user, $subject, $body_html, $body_text)
public booleansendEmailToUserByUserID(int $userid, string $subject, string $body_html, string $body_text)
Send an email to user by the user ID $CurrentUser
public getEmailTemplate($virtual_filename)
public getEmailSubjectAndBodyFromTemplate($virtual_filename, $vars)
public stringprocessMessageTemplate(string $text, array $vars)
Replaces variables (in format {$variablename} in text with variable values from $vars The regex has changed for Schlix v2
public getDefaultSignature()
public sendEmailFromWebMasterToUserByUserIDWithTemplateName($userid, $virtual_filename, $vars)
public sendEmailFromWebMasterWithTemplateName($field_to_name, $field_to_email, $virtual_filename, $vars)
public sendEmailWithTemplateName($field_from_name, $field_from_email, $field_to_name, $field_to_email, $field_cc_name, $field_cc_email, $field_replyto_name, $field_replyto_email, $virtual_filename, $vars)
public sendSimpleSignedEmailFromWebmaster(type $field_subject, type $field_to_name, type $field_to_email, type $body_html, type $body_text, type $attachments=NULL)
Send email with default sender
public sendSimpleSignedEmailToQueue(type $field_subject, type $field_from_name, type $field_from_email, type $field_to_name, type $field_to_email, type $body_html, type $body_text, type $attachments=NULL)
Send signed email
public sendSimpleEmailToQueue(string $field_subject, string $field_from_name, string $field_from_email, string $field_to_name, string $field_to_email, string $body_html, string $body_text, $attachments=NULL)
public sendSimpleEmailToQueueWithCC(type $field_subject, type $field_from_name, type $field_from_email, type $field_to_name, type $field_to_email, type $field_cc_name, type $field_cc_email, type $body_html, type $body_text, type $attachments=NULL)
public booleansendEmailToQueue(type $queue_marker, type $field_subject, type $field_from_name, type $field_from_email, type $field_to_name, type $field_to_email, type $field_cc_name, type $field_cc_email, type $field_replyto_name, type $field_replyto_email, type $field_bcc, type $field_priority, type $field_xmailer, type $field_return_receipt, type $body_html, type $body_text, type $attachments, type $extra_headers)
$SystemDB
public processQueueByID($id)
public viewMainPage()
Frontend: view the main page. Usually loads view.main.template.php
public booleanRun(string $command)
Runs command. If return value is true, then it will be displayed as a full page If return value is false, AJAX method is assumed

Protected Static Methods

protected static markEmailQueueAsSentByID($id)
protected static markEmailQueueAsFailedByID($id, $error_msg='')
protected static processSingleQueue($queue)
protected static error($mail, $errormessage)

Public Static Methods

public static stringgetEmailStorageFolderForID(int $id, bool $is_relative=FALSE)
Get email storage folder
public static __sendEmailDirectly($timeout, type $unique_id, type $field_subject, type $field_from_name, type $field_from_email, type $field_to_name, type $field_to_email, type $field_cc_name, type $field_cc_email, type $field_replyto_name, type $field_replyto_email, type $field_bcc, type $field_priority, type $extra_headers, type $field_xmailer, type $field_return_receipt, type $body_html, type $body_text, type $attachments)
Send email directly using PHPMailer. Don't set it to protected, it's a public method but users shouldn't access this method unless it's really critical so all emails are logged in the database Load Settings End load settings
public static getCountOfEmailsSentWithinLastHour()
public static getListOfUnsentEMails($max_count)
public static intgetMaxEmailsPerHour()
Return the max email sent per hour
public static intgetMaxEmailsPerBatch()
Return the max email sent per batch
public static processRunEmailQueue()