Automatic ticket is not generating after getting a mail

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

Moderators: Developer, Contributor

sonam
Posts: 14
Joined: 26 Sep 2014, 12:44

Automatic ticket is not generating after getting a mail

Post by sonam »

Hi,

Kindly please answer me for my issue.
Actually I have installed EmailReporting plugin in mantis and uploaded all this on my server(http://adroitsystems.in/client/mantisbt).

Set everything in "Manage Configuration Options" and "Manage Mailboxes" and set the cron job into my panel too using url(http://adroitsystems.in/client/mantisbt ... t_mail.php).

I get the mails when user send the mail to the email id(support@adroitsystems.in) which i configured into plugin.
But automatic ticket or issue doesn't created.

I even set the "Email Forwarding" to URL "/home/adroitsy/public_html/client/mantisbt/plugins/EmailReporting/scripts/bug_report_mail.php". But still not automatic issue is created in the account.

But yes... When i set "Block this script from running via a webserver (recommended = "Yes")" to "No" and run bug_report_mail.php file in the web brower with URL "http://adroitsystems.in/client/mantisbt ... t_mail.php".
Then in user account the ticket get created through email.

But on this URL "http://adroitsystems.in/client/mantisbt ... t_mail.php". I get this report:

------------------------------
Start checking all mailboxes: Wednesday 1st of October 2014 07:33:20

array(11) {
["enabled"]=>
bool(true)
["description"]=>
string(10) "Gmail test"
["mailbox_type"]=>
string(4) "POP3"
["hostname"]=>
string(22) "ssl://adroitsystems.in"
["port"]=>
int(995)
["encryption"]=>
string(3) "SSL"
["erp_username"]=>
string(24) "support@adroitsystems.in"
["erp_password"]=>
string(12) "U3BydEA0MzIx"
["auth_method"]=>
string(4) "USER"
["project_id"]=>
int(1)
["global_category_id"]=>
int(1)
}


Mailbox: Gmail test
Message: Mail debug directory does not exist or is not writable.


Mailbox: Gmail test
Message: Mail debug directory does not exist or is not writable.


Mailbox: Gmail test
Message: Reporter: 2 - noreply@example.com --> Issue ID: #32


Done checking all mailboxes

-----------------------


So please please let me know the correct steps to follow so that i can get automated ticket generated system through user emails.

Thanks.
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: Automatic ticket is not generating after getting a mail

Post by SL-Gundam »

Check the configuration settings for EmailReporting.

One part of the settings is about a debug directory which shows its current status behind it
sonam
Posts: 14
Joined: 26 Sep 2014, 12:44

Re: Automatic ticket is not generating after getting a mail

Post by sonam »

Helloo..

Kindly please answer my simple question...

I have set the Cron Job for every minute in my Cpanel for "bug_report_mail.php" as follows:

/opt/php52/bin/php-cgi -q /home/username/public_html/client/mantisbt/plugins/EmailReporting/scripts/bug_report_mail.php

And put configuration option in "...../mantisbt/plugin.php?page=EmailReporting/manage_config" as:

"Block this script from running via a webserver (recommended = "Yes")" to : "Yes"
AND ALSO
"Debug mode [?]" to : "No"

But my tickets are not automatically created.

But When I put "Block this script from running via a webserver (recommended = "Yes")" option in Configuration to : "No" and run file manually through web browser like:

http://adroitsystems.in/client/mantisbt ... t_mail.php

Tickets are created automatically.

So please please get me out of this problem or let me know what I am doing wrong.

Its so so much urgent for me.

Thanks.
sonam
Posts: 14
Joined: 26 Sep 2014, 12:44

Re: Automatic ticket is not generating after getting a mail

Post by sonam »

Hi there..

Kindly please answer me as soon as possible.
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: Automatic ticket is not generating after getting a mail

Post by SL-Gundam »

usually in packages like cpanel you will need to use the full url, not the local file path

So that would be http://www.example.com/mantis/plugins/E ... t_mail.php

Set "Block this script from running via a webserver (recommended = "Yes")" to : "No"
You are running a small risk by changing this setting but otherwise you will need to have a better understanding of your server to set this up differently
sonam
Posts: 14
Joined: 26 Sep 2014, 12:44

Re: Automatic ticket is not generating after getting a mail

Post by sonam »

Hi SL-Gundam,

Thanks for the reply but still my bug_report_mail.php is not running automatically through cron jobs.

I hav change the URL from

/opt/php52/bin/php-cgi -q /home/adroitsy/public_html/client/mantisbt/plugins/EmailReporting/scripts/bug_report_mail.php

to

http://adroitsystems.in/client/mantisbt ... t_mail.php

in my Cpanel Cron Jobs but still i am facing the same problem no automatic ticket is been generating when user report a issue.

I have to run this file manually through URL: http://adroitsystems.in/client/mantisbt ... t_mail.php

So please kindly help me to resolve this and tell me what i am doing wrong.
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: Automatic ticket is not generating after getting a mail

Post by SL-Gundam »

What happens when use this?

*/5 * * * * /opt/php52/bin/php /home/adroitsy/public_html/client/mantisbt/plugins/EmailReporting/scripts/bug_report_mail.php
sonam
Posts: 14
Joined: 26 Sep 2014, 12:44

Re: Automatic ticket is not generating after getting a mail

Post by sonam »

Hi

Same thing happens sir i.e. automatic ticket does not create when i set this

*/5 * * * * /opt/php52/bin/php /home/adroitsy/public_html/client/mantisbt/plugins/EmailReporting/scripts/bug_report_mail.php
sonam
Posts: 14
Joined: 26 Sep 2014, 12:44

Re: Automatic ticket is not generating after getting a mail

Post by sonam »

Hi SL-Gundam,

Kindly you please check this Mailbox configuration below might i have configured it wrong:

array (
0 =>
array (
'enabled' => true,
'description' => '',
'mailbox_type' => 'POP3',
'hostname' => 'MY HOST NAME',
'port' => '',
'encryption' => 'SSL',
'erp_username' => 'support@adroitsystems.in',
'erp_password' => 'MY PASS',
'auth_method' => 'USER',
'project_id' => 1,
'global_category_id' => 1,
),
)
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: Automatic ticket is not generating after getting a mail

Post by SL-Gundam »

Seems fine. If it works when you run it manually, it should work when you run it through a cron job

What happens when you run the below from within a terminal?

/opt/php52/bin/php /home/adroitsy/public_html/client/mantisbt/plugins/EmailReporting/scripts/bug_report_mail.php
sonam
Posts: 14
Joined: 26 Sep 2014, 12:44

Re: Automatic ticket is not generating after getting a mail

Post by sonam »

Hi SL-Gundam,

My issue regarding automatic ticket creation has been resolved. Actually there is a mistake in my URL which i am setting in Cron Jobs.

My Server person has talked to me and they asked to correct the URL and set the cron jobs to 15 mins. And put "No" to "Block this script from running via a webserver"

But now there is another problem i m facing with that

i am getting same mail regarding issues again and again after 15 mins.

So can you please let me know that what is the problem or any thing which i am doing wrong here

??
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: Automatic ticket is not generating after getting a mail

Post by SL-Gundam »

If you run the script manually through the browser do you get any errors?
sonam
Posts: 14
Joined: 26 Sep 2014, 12:44

Re: Automatic ticket is not generating after getting a mail

Post by sonam »

Hi SL-Gundam,

Thanks for your replies :) . All my problems with Email Reporting Plugin has been resolved.

The main problem is related to my Cron Jobs URL. Which i have corrected after asking my Server person.

But can you please tell me that can it be possible that only one mail which is a ticket or issue mail will come in Support Email id which i had configured in my plugin.

Actually when a client/user emails the issue on the support id(Which is configured in my project in Email Reporting Plugin) than two mails are coming in support Id.
One is a normal mail consisting of normal email text and other mail is in a proper ticket/issue form mail.

So please let me know that how to stop the first one from coming in my mail box. Actually i want that my support id should get only ticket form mail not a normal mail.

Thanks in advance.
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: Automatic ticket is not generating after getting a mail

Post by SL-Gundam »

Currently EmailReporting will process all emails in the mailbox so no way to exclude anything.

You could of course modify the existing code to suit your needs
sonam
Posts: 14
Joined: 26 Sep 2014, 12:44

Re: Automatic ticket is not generating after getting a mail

Post by sonam »

Ok.. I understand that thanks.

But why continually after every 5 minutes note is being added in my issue ticket and i get the email of same on my support email id. You can check this below ticket of the same.

I have set my cron job for 5 minutes but why i am getting notes email on my same issue ticket.


A NOTE has been added to this issue.
======================================================================
http://adroitinfosystem.com/../..
======================================================================
Reported By: administrator
Assigned To:
======================================================================
Project: test
Issue ID: 182
Category: PROJECTS
Reproducibility: have not tried
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2014-11-24 01:50 CST
Last Modified: 2014-11-24 02:40 CST
======================================================================
Summary: Mantis issue 1.18PM NOV 24
Description:
Email from: Sonam Bhatia <..>

Hi

This is a test issue.

--

*Thanks & Regards *

*Sonam Bhatia*
======================================================================

----------------------------------------------------------------------
(0000158) administrator (administrator) - 2014-11-24 01:55
http://adroitinfosystem.com/../..
----------------------------------------------------------------------
Email from: Mantis Bug Tracker <noreply@example.com>

The following issue has been SUBMITTED.
----------------------------------------------------------------------
(0000167) administrator (administrator) - 2014-11-24 02:40
http://adroitinfosystem.com/../..
----------------------------------------------------------------------
Email from: Mantis Bug Tracker <noreply@example.com>

A NOTE has been added to this issue.
[EmailReporting -> Removed part identified as reply]

Issue History
Date Modified Username Field Change
======================================================================
2014-11-24 01:50 administrator New Issue
2014-11-24 01:50 administrator File Added: mantis_issue2.txt

2014-11-24 01:55 administrator Note Added: 0000158
2014-11-24 02:00 administrator Note Added: 0000159
2014-11-24 02:05 administrator Note Added: 0000160
2014-11-24 02:10 administrator Note Added: 0000161
2014-11-24 02:15 administrator Note Added: 0000162
2014-11-24 02:20 administrator Note Added: 0000163
2014-11-24 02:25 administrator Note Added: 0000164
2014-11-24 02:30 administrator Note Added: 0000165
2014-11-24 02:35 administrator Note Added: 0000166
2014-11-24 02:40 administrator Note Added: 0000167

======================================================================
Post Reply