Toby Documentation
April 24, 2004Message Retrieval
After a user logs in, Toby connects to that user's email server to check for new messages. If there are any new messages, Toby downloads them from the server and copies them to the email
database.
To prevent duplicate messages showing up in Toby for these users, messages will only be downloaded once for each time this user logs in. That is, Toby will continue to attempt to download new messages each time the user opens their inbox, but after one or more messages are downloaded, Toby will not connect to the user's mail server until the user has logged out and logged in again. This is currently classified as a bug and will hopefully be fixed in a future release.
Alternatively, if the user has chosen to have Toby save his messages, Toby will then delete the messages from the server.
Toby stores e-mail messages in the following fields in the email
database:
Field | Type | Value |
id | Auto-incrementing integer | This is the unique identifier of each message in the database. |
user | Integer | This is the is of the user to whom this message belongs. This value corresponds with the `id` field in the email_users table. |
headers | Text | This contains the full headers of the message. |
message | (Long)text | This contains the first 100 000 characters of the message body. This limitiation is due to the maximum size some servers impose on MySQL queries. The remainder of the message is stored in 100 000 character chunks in the email_overflow database. |
Return-Path through Date | Varchar(255) or Text | These are individual header values that are used frequently by Toby and are stored in separate fields for easier access. |
num_attachments | Integer | This contains the number of attachments in the message, determined at the time when the message was first downloaded. |
has_html | (Tiny) integer | Indicates whether (1) or not (0) the message has an HTML portion. |
NiceDate | Varchar(14) | This is a YYYYMMDDHHMMSS timestamp of the sent-time of the message, stored in this format for easier manipulation by Toby. |
folder | Integer | Folder id of the folder in which this message lives. This value corresponds with the `id` field in the email_folders table. |
seen | (Tiny) integer | Indicates whether (1) or not (0) the user has read this message. |
temp | (Tiny) integer | Indicates whether (1) or not (0) this message is temporary. |
After Toby has downloaded any new messages, it loads the main client screen.
Next: The preview pane