Page 1 of 1

Error while running script

Posted: 15 Sep 2016, 16:16
by martinez.ivan
Hello,

I'm trying to configure the pluging but I'm having problems.

The first problem was when I installed it.

Code: Select all

Can't use function return value in write context in /var/www/xxxx.com/html/mantis/plugins/EmailReporting/core/config_api.php on line 912, referer: https://xxxx.com/mantis/adm_permissions_report.php
I fixed it with this modification: https://github.com/mantisbt-plugins/Ema ... 3642d95191

Now, when I run EmailReporting/pages/bug_report_mail.php I get the following error

Code: Select all

[PHP Warning:  Module 'ldap' already loaded in Unknown on line 0
PHP Warning:  Module 'mysql' already loaded in Unknown on line 0
PHP Warning:  Module 'mysqli' already loaded in Unknown on line 0
PHP Warning:  Module 'PDO' already loaded in Unknown on line 0
PHP Warning:  Module 'pdo_mysql' already loaded in Unknown on line 0
PHP Fatal error:  Call to undefined function plugin_config_get() in /var/www/xxxx.com/html/mantis/plugins/EmailReporting/pages/bug_report_mail.php on line 13
Information about environment

php : 5.4.41
Mantis : 1.3.1
Plugin : 0.9.2

Thank you

Re: Error while running script

Posted: 15 Sep 2016, 21:51
by SL-Gundam
Yes that commit is part of the 0.9.3 version which is still under development

Please try running: "EmailReporting/scripts/bug_report_mail.php"
You either run "plugins/EmailReporting/scripts/bug_report_mail.php" or "/plugin.php?page=EmailReporting/bug_report_mail" but not bug_report_mail.php from the pages folder

Let us know if you have any further issues

Re: Error while running script

Posted: 16 Sep 2016, 12:20
by martinez.ivan
Damn. You are right. I don't know why I used that path. Now it works.

Now, I have the following message

Code: Select all

Message: Failed to connect to the mail server. This could possibly be because SSL certificate verification failed
I'm using smtp.gmail.com:465 and SSL verification is disable. I know that this error is known in php version =<5.6 because ssl verification is activated by default but the one I'm using is 5.4.41. How can I bypass this verification?

Re: Error while running script

Posted: 17 Sep 2016, 17:32
by SL-Gundam
That part of the error shows when encryption is enabled. I forgot to hide it when cert verification is turned off

https://github.com/mantisbt-plugins/Ema ... 098aa0ebc7

So you have bypassed it properly.
As for why the connection fails. Does it also fail when you use "Test Mailbox"?

Re: Error while running script

Posted: 17 Sep 2016, 20:17
by martinez.ivan
I fixed the connection fail error. My firewall was blocking it. Now, I have the following error while trying to authenticate to smtp.gmail.com

Code: Select all

Location: Attempt login
[pear_error: message="502 5.5.1 Unrecognized command. f94sm8327284qtb.13 - gsmtp" code=-1 mode=return level=notice prefix="" info=""]
Method of auth is "USER".

I also configured another mailbox which is using an own smtp (postfix v 2.5.5-1.1 ) without authentication. The same smtp server is used by Mantis notificacion email and works without any problem.

Code: Select all

[pear_error: message="Unknown Response (503 5.5.1 Error: send HELO/EHLO first)" code=-1 mode=return level=notice prefix="" info=""]

Re: Error while running script

Posted: 17 Sep 2016, 21:05
by SL-Gundam
You should not use SMTP

EmailReporting needs to connects to POP3 or IMAP servers. So for gmail that would be

POP3:
Hostname: pop.gmail.com
Port number: 995
Encryption: SSL

IMAP:
Hostname: imap.gmail.com
Port number: 993
Encryption: SSL

Re: Error while running script

Posted: 21 Sep 2016, 22:50
by martinez.ivan
Ups. Thanks. Now it is working.

I have the following doubt.

As you know I'm using IMAP so I filled the field base folder and I checked subfolder structure configuration. After running script, it created as many labels as projects I have. So, I had to configured a Gmail filter to get all emails matched inside the project label but it is annoyed about configuring filter per filter for every new project.

Am I using the plugin correctly?

Thank you.

Re: Error while running script

Posted: 22 Sep 2016, 00:21
by SL-Gundam
That depends on what it is you want achieve

You can also disable the subfolder structure and EmailReporting will import from the basefolder. No filters necessary then. Leave basefolder empty and it will use the default folder (usually the inbox folder)

You can also set up multiple email addresses and multiple mailboxes in EmailReporting. This way the person that sends the email can decide the proper project

Re: Error while running script

Posted: 24 Sep 2016, 14:03
by martinez.ivan
Thank you for your help and for maintaining the project.

Thread can be closed

Re: Error while running script

Posted: 24 Sep 2016, 15:11
by SL-Gundam
Thank you for using this plugin and making it worthwhile