Document toolboxDocument toolbox

MailQueueEntry

The mail queue resides in the class MailQueueEntry.

The functions MailQueueEntry::htmlmail() and MailQueueEntry::textmail() queues an email and returns an object for the queue mail. The mail will not be sent until after you have called unHalt() on the object, or the mail has been approved.

The mail is sent using the library class.phpmailer.php. If Microbizz fails to send a mail, it is marked as 'bounced'.

The mail server is defined in the global config.php file.

Microbizz adds a few X-Microbizz-XXXX headers to the mail, to keep track of which contract sent the mail.

Bounce

A job (basic/bouncecheck) regularly checks if any mails were bounced by a mail server. The job only runs on contract 2355. Any bounced mails are then delegatated to the contract that sent the mail. This is done by storing the mail in the JobData system, and starting the job basic/importbounced on the contract.