Storing mail headers in the database
| Project: | Pontomail Webmail Client |
| Version: | HEAD |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | miglius |
| Status: | needs review |
Jump to:
I think that to make messages sortable we have to store all header information in the database. php imap sort functions don't pay attention to the encoding of the subject line and the sender. This breaks layout of the sorted messages
Folowing patch stores all message headers in the correct encoding in a cache, which lets us use native drupal paging mechanism. I use following table for that:
CREATE TABLE {pontomail_messages} (
mid int(11) NOT NULL auto_increment,
uid int(11) NOT NULL default '0',
sid int(11) NOT NULL default '0',
folder varchar(255),
muid int(11) NOT NULL default '0',
subject varchar(255),
mfrom varchar(255),
mto varchar(255),
mdate datetime,
size int(11) NOT NULL default '0',
recent tinyint(1),
flagged tinyint(1),
answered tinyint(1),
deleted tinyint(1),
seen tinyint(1),
draft tinyint(1),
PRIMARY KEY (mid))
/*!40100 DEFAULT CHARACTER SET utf8 */
After aplying this patch table pontomail_page_holder is depreciated.
| Attachment | Size |
|---|---|
| p.diff.txt | 13.27 KB |

#1
This table could be extended with a data item 'body'. I'd love to see POP3 support in Pontomail sometime. Pontomail and SMTP do already exist, so why not introduce POP3 to Drupal?