EmailReporting : problem with IMAP and Gmail

This plugin allows you to report an issue in MantisBT by sending an email to a particular mail account

Moderators: Developer, Contributor

Post Reply
e-Real
Posts: 7
Joined: 16 Apr 2014, 17:40

EmailReporting : problem with IMAP and Gmail

Post by e-Real »

Hi,

I use Mantis (MantisBT Core 1.2.17) installed on Windows.
I have installed and configured the plugin : Email Reporting (Email Reporting 0.9.0-DEV).
I use it to connect to my gmail account, to create ticket for each email received.

I have the following problem :

Via POP3 (pop.gmail.com on 995), the test of my configuration is ok. Tickets are correctly created.
But with IMAP, I always have the following message : "Failed to connect to the mail server"
array (size=13)
'enabled' => boolean true
'description' => string 'MailBox TEST' (length=12)
'mailbox_type' => string 'IMAP' (length=4)
'hostname' => string 'ssl://imap.gmail.com' (length=20)
'port' => int 993
'encryption' => string 'SSL' (length=3)
'erp_username' => string '[MAIL]@gmail.com' (length=18)
'erp_password' => string '[pass]' (length=12)
'auth_method' => string 'USER' (length=4)
'project_id' => int 2
'global_category_id' => int 1
'imap_basefolder' => string '' (length=0)
'imap_createfolderstructure' => boolean false


Mailbox: MailBox TEST
Message: Failed to connect to the mail server
(I have deleted my user and password on this quote)
I am able to do a telnet on Windows on this port (telnet imap.google.com 993 works)
IMAP is authorized on my gmail account.

Do you have idea about the origin of the problem?
Thanks for your help.
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: EmailReporting : problem with IMAP and Gmail

Post by SL-Gundam »

I checked this

Make sure you've filled in the port (it's 993) and set encryption to "None"

The reason encryption needs to be disabled is that it seems to not work well with the recent release of the PEAR net_imap plugin. If you disable encryption, net_imap will try to auto detect the encryption and therefore it will still work for google imap.
e-Real
Posts: 7
Joined: 16 Apr 2014, 17:40

Re: EmailReporting : problem with IMAP and Gmail

Post by e-Real »

Yes ! It works !
Thanks a lot.

The correct configuration is so :
array (size=13)
'enabled' => boolean true
'description' => string 'MailBox TEST' (length=12)
'mailbox_type' => string 'IMAP' (length=4)
'hostname' => string 'imap.gmail.com' (length=14)
'port' => int 993
'encryption' => string 'None' (length=4)
'erp_username' => string 'jbillaut@gmail.com' (length=18)
'erp_password' => string '[pass]' (length=12)
'auth_method' => string 'USER' (length=4)
'project_id' => int 2
'global_category_id' => int 1
'imap_basefolder' => string '' (length=0)
'imap_createfolderstructure' => boolean false
We have to put "Encryption" to "None" in imap, with port = 993.

Regards.
Post Reply