Email Reporting doesn't work

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

Moderators: Contributor, Developer

Neutel
Posts: 10
Joined: Jun 11, 2018 9:32 am

Email Reporting doesn't work

Post by Neutel » Jun 11, 2018 10:08 am

Hi i have a problem with the email reporting plugin , i have configured all but it doesn't work : i don't see any reported issue .
We are a company that has the necessity to save automatically bugs of clients from outlook email to mantisbt
I set correctly the mailbox setting of the account in whitch the email should arrive but now what i can do ?
need i to configure any sheduled job or install other plugins for example the forward issue plugin?
I follow other tutorial , for example this : https://www.youtube.com/watch?v=at0JYuIH3-0. I also don't find any version of forwar issue plugin suitable for mantisbt core 2.14.0 (email reporting version: 0.10.1)


Neutel
Posts: 10
Joined: Jun 11, 2018 9:32 am

Re: Email Reporting doesn't work

Post by Neutel » Jun 11, 2018 3:23 pm

I read this documentation but i don't understand what i should do on Manege Configuration>Configuration report>Database Configuration . In the mantis installation folder i have to change something? Sometimes in the mailbox settings in mantis i have this error : Location: Attempt login
[pear_error: message=", " code=0 mode=return level=notice prefix="" info=""]
thanks for your help!

SL-Gundam
Posts: 528
Joined: Jul 06, 2011 9:17 am

Re: Email Reporting doesn't work

Post by SL-Gundam » Jun 11, 2018 4:21 pm

Don't know what you mean with database configuration. You need to schedule a job to retrieve emails
Scheduling a job for bug_report_mail:
bug_report_mail can be used via scheduled job like this:

Linux or similar OS using Cron jobs:
Via webserver (see settings because this is disabled by default, see plugin
config page in mantis)
*/5 * * * * lynx --dump http://mantis.homepage.com/plugin.php?p ... eport_mail
or via command line interface
*/5 * * * * /usr/local/bin/php /path/to/mantis/plugins/EmailReporting/scripts/bug_report_mail.php

This line fetches bug reports via POP3 or IMAP every 5 minutes.

Windows or similar OS:
Via webserver (see settings because this is disabled by default, see plugin
config page in mantis)
No known method for scheduling this via webserver
or via command line interface
c:\php\php.exe c:\path\to\mantis\plugins\EmailReporting\scripts\bug_report_mail.php
The error you are getting means that something went wrong with retrieving mail from the mailbox. But a proper error was not returned.

Neutel
Posts: 10
Joined: Jun 11, 2018 9:32 am

Re: Email Reporting doesn't work

Post by Neutel » Jun 12, 2018 3:28 am

Ok all is setup correctly but i see client's email as bug only after i manually select "complete the test" of the main mailbox (where mail should arrive) . When i do this all the mail received are saved in the same time as bug in mantis . So i need something that control the mailbox every X minutes . In this moment it's necessary create a scheduled job but i don't know how to do . Sorry , I know you have already answered to this question but i really can't understand where the scheduled job must be created and what i should do to write and activate it .

Neutel
Posts: 10
Joined: Jun 11, 2018 9:32 am

Re: Email Reporting doesn't work

Post by Neutel » Jun 12, 2018 4:28 am

Perhaps i have understand , i need to create a task scheduler job using windows that run the script bug_report_mail.php for example every 5 minutes .
Is it correct?

Neutel
Posts: 10
Joined: Jun 11, 2018 9:32 am

Re: Email Reporting doesn't work

Post by Neutel » Jun 12, 2018 5:15 am

I tried this but it doesn't work

SL-Gundam
Posts: 528
Joined: Jul 06, 2011 9:17 am

Re: Email Reporting doesn't work

Post by SL-Gundam » Jun 12, 2018 12:36 pm

Then the job is not properly set up. My test environment is all windows and i'm using task scheduler as well

try running the job from a command shell (cmd.exe) with the same command line the task scheduler would run it
Task scheduler should run "c:\php\php.exe" with "c:\path\to\mantis\plugins\EmailReporting\scripts\bug_report_mail.php" as an argument
replace paths as needed for the location of PHP and MantisBT

Neutel
Posts: 10
Joined: Jun 11, 2018 9:32 am

Re: Email Reporting doesn't work

Post by Neutel » Jun 13, 2018 4:16 am

Yeah i configure it . I have posted three attachments that represent my situation . I set the task scheduler but the adding of email as bug on mantis is still manual and not automatic. I don't understand why it doesn't work. Should I run the php script from browser using a xampp server? In this case i have already set a localhost with bitnami mantis stack manager tool but i didn't use xampp.
Attachments
cmd.PNG
cmd test
cmd.PNG (8.18 KiB) Viewed 981 times
email reporting.PNG
email reporting
email reporting.PNG (8.88 KiB) Viewed 981 times
task scheduler.PNG
task scheduler
task scheduler.PNG (32.8 KiB) Viewed 981 times

SL-Gundam
Posts: 528
Joined: Jul 06, 2011 9:17 am

Re: Email Reporting doesn't work

Post by SL-Gundam » Jun 13, 2018 9:45 am

C:\php\php.exe is an example. Its not necessarily the location where your php installation is located.
"bug_report_mail" is missing the extension ".php". So should have been "bug_report_mail.php"

What happens when you run the script you have in the command line? Also this should have been something like "c:\php\php.exe c:\something\here\bug_report_mail.php" on one line. Not two lines as it is with your screenshots
Last edited by SL-Gundam on Jun 14, 2018 9:42 am, edited 2 times in total.

Neutel
Posts: 10
Joined: Jun 11, 2018 9:32 am

Re: Email Reporting doesn't work

Post by Neutel » Jun 14, 2018 1:55 am

When I run the correct script(sorry for .php) in the command line i have this (cmd.png) In the task scheduler i run C:\Bitnami\mantis-2.14.0-0\php\php.exe whith the script C:\Bitnami\mantis-2.14.0-0\apps\mantis\htdocs\plugins\EmailReporting\scripts\bug_report_mail.php as argument (task scheduler.png)
Attachments
task scheduler.PNG
task scheduler.PNG (9.41 KiB) Viewed 958 times
cmd.PNG
cmd.PNG (32.08 KiB) Viewed 958 times

Neutel
Posts: 10
Joined: Jun 11, 2018 9:32 am

Re: Email Reporting doesn't work

Post by Neutel » Jun 14, 2018 2:37 am

I tried to change the task scheduler and in this way(task scheduler correct.png) the computer say it work correctly but
I have yet to try if the reporting of bugs is automatic now in mantis
Attachments
task scheduler correct.PNG
task scheduler correct.PNG (9.95 KiB) Viewed 957 times

Neutel
Posts: 10
Joined: Jun 11, 2018 9:32 am

Re: Email Reporting doesn't work

Post by Neutel » Jun 14, 2018 8:54 am

Now email reporting is working , the emails of the clients arrives on the main mail account and they are automatically uploaded on the view bugs form of mantisbt. Thanks a lot for your advice ,time and patience !

SL-Gundam
Posts: 528
Joined: Jul 06, 2011 9:17 am

Re: Email Reporting doesn't work

Post by SL-Gundam » Jun 14, 2018 9:41 am

Good to know its working

If you have any other issues please let us know

Neutel
Posts: 10
Joined: Jun 11, 2018 9:32 am

Re: Email Reporting doesn't work

Post by Neutel » Jun 21, 2018 2:42 am

Sorry, i have another problem. I need to use email reporting of mantis with a microsoft exchange mail. I don't know if I can configure email reporting in mantis immediately or I have to set the imap in my email account . I tried to configure imap in my exchange mail. I followed the same operations that i have done a few days ago with a trial gmail account (and it works) but when i complete the test int the Mailbox settings form in Mantis i have this error : Failed to connect to the mail server
What could I do?

Post Reply