Emailer Notes
When Daisy sends emails (this is e.g. done by the email notifier, the user self-registration component, the workflow task notifications), the emails are first queued in a database table. The purpose of this is to decouple the component that sends email from the actual sending of the emails.
The database table used for this is called email_queue, and has the following structure:
mysql> show columns from email_queue; +---------------+--------------+------+-----+---------------------+----------------+ | Field | Type | Null | Key | Default | Extra | +---------------+--------------+------+-----+---------------------+----------------+ | from_address | varchar(255) | YES | | NULL | | | to_address | varchar(255) | | | | | | subject | varchar(255) | | | | | | message | mediumtext | | | | | | retry_count | tinyint(4) | | | 0 | | | last_try_time | datetime | YES | | NULL | | | created | datetime | | | 0000-00-00 00:00:00 | | | id | bigint(20) | | PRI | NULL | auto_increment | | error | varchar(255) | | | | | +---------------+--------------+------+-----+---------------------+----------------+
The emailer component checks regularly (by default: every 20 seconds) if new records have been inserted. It then sends the corresponding email for each of these new records, if a mail is successfully sent (i.e., handed over to the smtp server), the record gets deleted from the database table. If it fails, the exception message is put in the error column, the retry_count column is augmented, and the last_try_time column gets the current time.
The emailer component will try up to 3 times to send a mail, each time waiting 5 hours in between (these values are configurable), before giving up. The record for that email then keeps sitting in the database table for a certain time (by default 7 days), after which it is removed without further notice.
If mails couldn't get out because of a configuration error, or because the smtp server was down, and you want to force the mails to be resent, you can do this by resetting the retry_count and last_try_time columns:
update email_queue set retry_count = 0, last_try_time = null;



There are no comments.