[ Index ] |
PHP Cross Reference of Eventum |
[Source view] [Print] [Project Stats]
(no description)
File Size: | 457 lines (18 kb) |
Included or required: | 4 times |
Referenced: | 0 times |
Includes or requires: | 6 files include/class.date.php include/class.mime_helper.php include/class.user.php include/class.lock.php include/class.error_handler.php include/class.setup.php |
Mail_Queue:: (12 methods):
isSafeToRun()
removeProcessFile()
add()
send()
_sendEmail()
_getHeaders()
_getList()
_saveLog()
_getErrorMessage()
getListByIssueID()
getEntry()
getMessageRecipients()
Class: Mail_Queue - X-Ref
isSafeToRun() X-Ref |
Checks whether it is safe or not to run the mail queue script. return: boolean |
removeProcessFile() X-Ref |
Clears the lock file for the next time this script runs again. return: void |
add($recipient, $headers, $body, $save_email_copy = 0, $issue_id = false, $type = '', $sender_usr_id = false, $type_id = false) X-Ref |
Adds an email to the outgoing mail queue. param: string $recipient The recipient of this email param: array $headers The list of headers that should be sent with this email param: string $body The body of the message param: integer $save_email_copy Whether to send a copy of this email to a configurable address or not (eventum_sent@) param: integer $issue_id The ID of the issue. If false, email will not be associated with issue. param: string $type The type of message this is. param: integer $sender_usr_id The id of the user sending this email. param: integer $type_id The ID of the event that triggered this notification (issue_id, sup_id, not_id, etc) return: true, or a PEAR_Error object |
send($status, $limit) X-Ref |
Sends the queued up messages to their destinations. This can either try to send emails that couldn't be sent before (status = 'error'), or just emails just recently queued (status = 'pending'). param: string $status The status of the messages that need to be sent param: integer $limit The limit of emails that we should send at one time |
_sendEmail($recipient, $text_headers, $body, $status) X-Ref |
Connects to the SMTP server and sends the queued message. param: string $recipient The recipient of this message param: string $text_headers The full headers of this message param: string $body The full body of this message param: string $status The status of this message return: true, or a PEAR_Error object |
_getHeaders($text_headers, $body) X-Ref |
Parses the full email message and returns an array of the headers contained in it. param: string $text_headers The full headers of this message param: string $body The full body of this message return: array The list of headers |
_getList($status, $limit = 50) X-Ref |
Retrieves the list of queued email messages, given a status. param: string $status The status of the messages param: integer $limit The limit on the number of messages that need to be returned return: array The list of queued email messages |
_saveLog($maq_id, $status, $server_message) X-Ref |
Saves a log entry about the attempt, successful or otherwise, to send the queued email message. param: integer $maq_id The queued email message ID param: string $status The status of the attempt ('sent' or 'error') param: string $server_message The full message from the SMTP server, in case of an error return: boolean |
_getErrorMessage($error) X-Ref |
Handles the PEAR_Error object returned from the SMTP server, and returns an appropriate error message string. param: object $error The PEAR_Error object return: string The error message |
getListByIssueID($issue_id) X-Ref |
Returns the mail queue for a specific issue. param: integer $issue_is The issue ID return: array An array of emails from the queue |
getEntry($maq_id) X-Ref |
Returns the mail queue entry based on ID. param: integer $maq_id The id of the mail queue entry. return: array An array of information |
getMessageRecipients($types, $type_id) X-Ref |
No description |
Generated: Wed Dec 19 21:21:33 2007 | Cross-referenced by PHPXref 0.7 |