thebuggenie/thebuggenie — pull request #109 by LuCiAn0 (2012-08-10 15:19:30+00:00)
Title: Folder option for incoming email module

Option to set folder name in the incoming email settings. That way same account can be used for different projects and different issue types. Gmail names folders as labels. It has been tested with gmail and a regular account using imap and it works just fine.

I had to add one field to the incoming email module table: "folder".
CREATE TABLE tbg3_mailing_incoming_email_account (
name varchar(200) DEFAULT NULL,
server varchar(200) DEFAULT NULL,
port int(10) DEFAULT '0',
server_type int(10) DEFAULT '0',
ssl tinyint(1) DEFAULT NULL,
keep_email tinyint(1) DEFAULT NULL,
username varchar(200) DEFAULT NULL,
password varchar(200) DEFAULT NULL,
project int(10) DEFAULT '0',
issuetype int(10) DEFAULT '0',
num_last_fetched int(10) DEFAULT '0',
time_last_fetched int(10) DEFAULT '0',
scope int(10) DEFAULT '0',
id int(10) unsigned NOT NULL AUTO_INCREMENT,
folder varchar(200) DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;