View Issue Details

IDProjectCategoryView StatusLast Update
0007086Plugin - EmailReportingGeneralpublic2015-10-30 03:29
Reporterdrostan Assigned ToSL-Gundam  
PrioritynormalSeverityfeatureReproducibilityalways
Status closedResolutionfixed 
Summary0007086: Mantis email via IMAP + folders
Description

It would be great if Mantis can access an email account through IMAP, and then take mail for various projects from folders in the mail account. That way, it's easy to just file the messages in the right folder from a general helpdesk account (mail client), and have them assigned to the right project.

Additional Information

Could perhaps be based on project name in a specific subfolder of the IMAP account; if the folder doesn't exist, just skip. Or the option to create the folder together with creation of the project.

Related to:
http://bugs.mantisbt.org/view.php?id=4286
http://bugs.mantisbt.org/view.php?id=1568
http://bugs.mantisbt.org/view.php?id=3320
(I can't add the relations myself... and they are becoming a bit cyclical :-))

Tagsclose_me, patch
Attached Files
Mantis-IMAP.ZIP (5,290 bytes)

Relationships

related to 0004286 closedSL-Gundam Plugin - EmailReporting Solution for reporting via E-Mail 
related to 0001568 closedgrangeway mantisbt Abillity to send mail to mantis adding bugs and bugnotes 
related to 0003320 closedgrangeway mantisbt Email ability 
related to 0008984 closedSL-Gundam Plugin - EmailReporting Adding notes to existing bug via email 

Activities

brody

brody

2008-01-30 10:49

reporter   ~0016887

php5 has the ability to connect using pop3 and imap (as described at http://de2.php.net/manual/en/ref.imap.php) through an extension dll.

Question to the community:
Is there a package like "Net" (which supports POP3) for IMAP or does anyone use email binding for mantis instead of POP3 with an IMAP solution? POP3 for mantis seems to use no native php library, but a pear package.

rolfkleef

rolfkleef

2008-02-04 15:04

reporter   ~0016945

hi Brody,

We're using Net_IMAP and our own version of code (derived from the POP3 code, but using a single IMAP account). I'll attach it to this issue.

Regards, Rolf

(PS: the reporter of this issue, 'drostan', is my previous id here)

brody

brody

2008-02-06 10:26

reporter   ~0016967

Hi Rolf,

great - thanks a lot for your support. I'll take a look at it, if I could get it running. I read the readme inside your zip archive and it seems to me that it would be also my solution (or something like a basis).

I'll keep you (and the community) posted through additional notes at this issue

Wolfgang

rolfkleef

rolfkleef

2008-02-06 16:56

reporter   ~0016972

Looking forward to it! Maybe one day have a complete IMAP + SMTP + SIEVE filters management plugin for complete email integration :-)

brody

brody

2008-09-10 04:27

reporter   ~0019345

Hoho Rolf :-)

I got your IMAP-solution running on my system. Because of less time through a lot of customer support doings, I was only just the last days able to integrate this package into my system - with success. One thing might be interesting for the community - you wrote that you use the NET_IMAP package; please let me add, that it must be the last release package (Net_IMAP-1.0.3.tgz), not the also available 1.1.0beta package.

Wolfgang

rolfkleef

rolfkleef

2008-09-10 10:27

reporter   ~0019351

Great to hear it's of use, Wolfgang :-) and thanks for the Net_IMAP version details!

vboctor

vboctor

2009-11-04 03:20

manager   ~0023565

@rolfkleef, did you consider making this a 1.2.x plugin? I haven't looked at the implementation, but a plugin is a good approach for Mail2MantisBT gateways.

rolfkleef

rolfkleef

2009-11-05 11:15

reporter   ~0023599

hi Victor, no, not considered it yet (still need to upgrade to 1.2.x, haven't looked at the plugin architecture)

I agree it's probably the best way forward, so if anyone reading this already wants to have a go at it...

SL-Gundam

SL-Gundam

2009-12-01 15:24

manager   ~0023838

Last edited: 2009-12-01 18:04

Hi

I'm the one who is currently maintaining the EmailReporting plugin in 0004286

I've added IMAP functionality based on Rolf Kleefs work to the EmailReporting plugin in: MantisBT-1.2.0rc2_plugin_EmailReporting-0.7.0.rar

The latest note with the changelog for the above version can be found here: 0004286:0023837

SL-Gundam

rolfkleef

rolfkleef

2009-12-02 14:02

reporter   ~0023841

That's really cool, SL-Gundam, thanks! Time to close this issue :-)

bolshi

bolshi

2010-01-21 16:28

reporter   ~0024208

Hello,
we want to use EmailReporting with IMAP functionality.

As described I copied the bug_report_mail_imap.php into the main folder and
mail_api_imap.php into the folder core. Then I installed NET_IMAP from PEAR. After that I updated config_inc.php with the following settings for the IMAP account:

$g_mail_imap_account_host = "host.imap.de"
$g_mail_imap_account_user = "ticket@helpcenter.de"
$g_mail_imap_account_pass = "pwd"
$g_mail_imap_account_base = "base_folder"
$g_mail_imap_createifnotexist = ON

Then I created a cronjob. Actually I got one message:

"Bad connection: could not find mail_api.php"

What went wrong? Kind regards, bolshi

rolfkleef

rolfkleef

2010-01-26 19:51

reporter   ~0024256

Hi bolshi,

can you specify more exactly what you tried to do? the "bad connection" part of your message doesn't seem to come from Mantis.

Rolf.

bolshi

bolshi

2010-02-04 09:17

reporter   ~0024315

Last edited: 2010-02-04 09:25

Hi Rolf,
unfortunately I posted in the wrong bugtracker. I solved the problem above. I reinstalled everything. I'm happy to say that I don't get any error warnings. But there's no mail if someone posts a ticket in mantis.

That's what we get if we test the connection:

Operation NOT successful

Mailbox description: mantis request via IMAP
Mail server type: IMAP
Mail server hostname(:port): mail.server.de:143
Mailbox connection encryption: None
Mailbox username: ticket@server.de
Mailbox password: **
Authentication method: PLAIN
Mailbox basefolder (IMAP): to_mantis

[pear_error: message=", " code=0 mode=return level=notice prefix="" info=""]

We set an imap folder 'to_mantis' within Thunderbird. SL-Gundam said the problem comes from cronjob. I couldn't find a description to define it.

Regards, Ingo

bolshi

bolshi

2010-02-16 02:37

reporter   ~0024394

Hi there,
I tried a lot of different configurations. It brought nothing. Every hint would be helpful.

Ingo

ceasaro

ceasaro

2010-03-31 04:33

reporter   ~0024965

Last edited: 2010-03-31 04:36

We just updated mantis to 1.2. And I successfully installed the EmailReporting plugin connecting to our microsoft exchange mail server.
But I had some trouble understanding the 'Mailbox basefolder (IMAP)' setting. When I don't fill it in I thought it would read the email from the inbox but it didn't. After a while (trial and error by creating some folders in exchange) I managed to get it to work.
First I got a lot of 'IMAP basefolder not found.' messages but finally i figured out to create a folder next to my Inbox instead of in my Inbox folder :-).

I just wanted to let you I'm happy with the plugin but I had a hard time to get it up and running with IMAP.

When I use 'Inbox' as the IMAP basefolder it does report issues form emails but these aren't the new emails arrived in the inbox. I can't figure out from where the EmailReporting plugin read it's e-mail, because the mailbox I used to test contains serveral folders (inside in inbox) and the inbox it self contains about 3500 e-mails. But it reads an email from somewhere and creates an issue for it.
I don't know if it's an issue of the EmailReporting plugin or maybe of the obscure implementation of the exchange server :-).

I would like to be able to read the e-mail from the Inbox straight away do you have any idea how to get that to work?

ceasaro

ceasaro

2010-03-31 04:46

reporter   ~0024966

I tested some more and tried some emails with attachments. Is the EmailReporting plugin able to handle attachments and add them to the new created issue?
The sad thing is that the email is deleted after an issue is created, resulting in the lose of the attachment.
When I configure the mailbox to leave the email on the mail server (Delete processed mail from the mailbox) It keeps creating issues for the first email in the IMAP folder, resulting in duplicate issues from the same email. The EmailReporting plugin doesn't recognize that it has already created an issue for that email.

I hope you can help me with my issues, especially the attachments is a requirement for our support system to work :-).

SL-Gundam

SL-Gundam

2010-03-31 13:29

reporter   ~0024988

IMAP and the mail delete feature don't work well together in 0.7.9 and earlier versions. That should be fixed in 0.8.0 which i'm working on now

I will investigate the problems with assigning the IMAP basefolder to inbox. But depending on whether you enabled the creation of the project subfolder structure, the inbox folder will be ignored and it will create and read emails from subfolders that have the same name as the projects that are available in mantis. Why not just use POP3. That protocol allways reads the inbox?

Attachments are supported. But it highly depends on several settings within the mantisbt core. For example the plugin adheres to the minimum and maximum size thats allowed for plugins and file types which are not allowed by the settings will be ignored.

SL-Gundam

ceasaro

ceasaro

2010-04-01 03:24

reporter   ~0024992

@SL-Gundam, Thanks for the feedback i will dive in the mantisbt core to figure out the it's configuration regarding attachments.

About the POP3 option, I already asked our system adminstrator but he had his reasons not to enable POP3 but I will try again :-).

Good luck with the further implementation.

SL-Gundam

SL-Gundam

2010-04-25 08:24

reporter   ~0025247

Last edited: 2010-04-25 08:25

Well if you look at 0004286 you will find out that 0.8.0 has been released.

The basefolder setting is now optional. If you leave it empty it should select the inbox folder