This plugin allows you to report an issue in MantisBT by sending an email to a particular mail account
Moderators: Developer , Contributor
robmaster
Posts: 8 Joined: 23 Jul 2018, 16:14
Post
by robmaster » 23 Jul 2018, 16:24
Hey gents,
I maintained a POP3 mailbox under Configuration. All seems to be fine, but after hitting Complete test, no email in my inbox is transferred to a ticket. So I tried to run the PHP script html/mantisbt/plugins/EmailReporting/scripts/bug_report_mail.php directly, and it just returns following information:
Code: Select all
Start checking all mailboxes: Monday 23rd of July 2018 16:10:11
Done checking all mailboxes
And that's it. No error message and I have no clue what's going wrong there
Any ideas, can you help out?
Thanks a lot
Rob
SL-Gundam
Posts: 722 Joined: 06 Jul 2011, 14:17
Post
by SL-Gundam » 23 Jul 2018, 16:55
Please activate debug mode and run it again
What version of MantisBT are you running?
What version of EmailReporting are you running?
robmaster
Posts: 8 Joined: 23 Jul 2018, 16:14
Post
by robmaster » 23 Jul 2018, 17:49
Hey SL-Gundam,
Sorry for not being precise on my initial description. I'm using MantisBT 2.15.0 and EmailReporting-0.10.1. After starting the script again in debug mode it returns following data (changed it a bit
).
Code: Select all
Start checking all mailboxes: Monday 23rd of July 2018 17:44:29
array(12) {
["enabled"]=>
int(1)
["description"]=>
string(9) "General"
["mailbox_type"]=>
string(4) "POP3"
["hostname"]=>
string(21) "mail.foo.de"
["port"]=>
int(110)
["encryption"]=>
string(8) "STARTTLS"
["ssl_cert_verify"]=>
int(1)
["erp_username"]=>
string(21) "support@foo.de"
["erp_password"]=>
string(16) "password"
["auth_method"]=>
string(4) "USER"
["project_id"]=>
int(2)
["global_category_id"]=>
int(1)
}
Done checking all mailboxes
robmaster
Posts: 8 Joined: 23 Jul 2018, 16:14
Post
by robmaster » 23 Jul 2018, 19:46
Thanks for your quick reply, so I tried it again and it returns now much more information. After processing the script I can see that the email vanishes in my
support@foo.de Inbox. But unfortunately I can't see any new ticket in my MantisBT
Code: Select all
Start checking all mailboxes: Monday 23rd of July 2018 19:40:02
Debug output memory usage
Location: Mail API - Finished __construct
Runtime in seconds: 0
Current memory usage: 7.72 MiB / -1
Peak memory usage: 7.8 MiB / -1
Current real memory usage: 10 MiB / -1
Peak real memory usage: 10 MiB / -1
array(12) {
["enabled"]=>
int(1)
["description"]=>
string(9) "Allgemein"
["mailbox_type"]=>
string(4) "POP3"
["hostname"]=>
string(21) "mail.foo.de"
["port"]=>
int(110)
["encryption"]=>
string(8) "STARTTLS"
["ssl_cert_verify"]=>
int(1)
["erp_username"]=>
string(21) "support@foo.de"
["erp_password"]=>
string(16) "PASSWORD"
["auth_method"]=>
string(4) "USER"
["project_id"]=>
int(2)
["global_category_id"]=>
int(1)
}
Debug output memory usage
Location: Mail API - Start process mailbox
Runtime in seconds: 0.0059
Current memory usage: 7.72 MiB / -1
Peak memory usage: 7.8 MiB / -1
Current real memory usage: 10 MiB / -1
Peak real memory usage: 10 MiB / -1
Debug output memory usage
Location: Mail API - Start process single email
Runtime in seconds: 0.1239
Current memory usage: 7.74 MiB / -1
Peak memory usage: 7.8 MiB / -1
Current real memory usage: 10 MiB / -1
Peak real memory usage: 10 MiB / -1
Debug output memory usage
Location: Mail API - Single email retrieved from mailbox
Runtime in seconds: 0.1314
Current memory usage: 7.75 MiB / -1
Peak memory usage: 7.8 MiB / -1
Current real memory usage: 10 MiB / -1
Peak real memory usage: 10 MiB / -1
Mailbox: Allgemein
Message: Mail debug directory does not exist or is not writable.
Debug output memory usage
Location: Mail API - Start Mail Parser
Runtime in seconds: 0.1315
Current memory usage: 7.75 MiB / -1
Peak memory usage: 7.8 MiB / -1
Current real memory usage: 10 MiB / -1
Peak real memory usage: 10 MiB / -1
Debug output memory usage
Location: Mail Parser - Start parse
Runtime in seconds: 0.1322
Current memory usage: 7.77 MiB / -1
Peak memory usage: 7.8 MiB / -1
Current real memory usage: 10 MiB / -1
Peak real memory usage: 10 MiB / -1
Debug output memory usage
Location: Mail Parser - mimeDecode initiated
Runtime in seconds: 0.1326
Current memory usage: 7.77 MiB / -1
Peak memory usage: 7.8 MiB / -1
Current real memory usage: 10 MiB / -1
Peak real memory usage: 10 MiB / -1
Debug output memory usage
Location: Mail Parser - mimeDecode finished
Runtime in seconds: 0.1338
Current memory usage: 7.8 MiB / -1
Peak memory usage: 7.84 MiB / -1
Current real memory usage: 10 MiB / -1
Peak real memory usage: 10 MiB / -1
Debug output memory usage
Location: Mail Parser - Start parse structure
Runtime in seconds: 0.1338
Current memory usage: 7.78 MiB / -1
Peak memory usage: 7.84 MiB / -1
Current real memory usage: 10 MiB / -1
Peak real memory usage: 10 MiB / -1
Debug output memory usage
Location: Mail API - Finished Mail Parser
Runtime in seconds: 0.143
Current memory usage: 7.76 MiB / -1
Peak memory usage: 7.84 MiB / -1
Current real memory usage: 10 MiB / -1
Peak real memory usage: 10 MiB / -1
Debug output memory usage
Location: Mail API - Parsed single email
Runtime in seconds: 0.1431
Current memory usage: 7.74 MiB / -1
Peak memory usage: 7.84 MiB / -1
Current real memory usage: 10 MiB / -1
Peak real memory usage: 10 MiB / -1
Mailbox: Allgemein
Message: Mail debug directory does not exist or is not writable.
Debug output memory usage
Location: Mail API - Start add bug
Runtime in seconds: 0.1597
Current memory usage: 8.25 MiB / -1
Peak memory usage: 8.49 MiB / -1
Current real memory usage: 10 MiB / -1
Peak real memory usage: 10 MiB / -1
Mailbox: Allgemein
Message: Reporter: 3 - foo@bar.de --> Issue ID: #3
Debug output memory usage
Location: Mail API - Finished add bug
Runtime in seconds: 0.2198
Current memory usage: 8.28 MiB / -1
Peak memory usage: 8.49 MiB / -1
Current real memory usage: 10 MiB / -1
Peak real memory usage: 10 MiB / -1
Debug output memory usage
Location: Mail API - Start processing attachments
Runtime in seconds: 0.2199
Current memory usage: 8.28 MiB / -1
Peak memory usage: 8.49 MiB / -1
Current real memory usage: 10 MiB / -1
Peak real memory usage: 10 MiB / -1
Debug output memory usage
Location: Mail API - Finished processing attachments
Runtime in seconds: 0.2256
Current memory usage: 8.29 MiB / -1
Peak memory usage: 8.49 MiB / -1
Current real memory usage: 10 MiB / -1
Peak real memory usage: 10 MiB / -1
Debug output memory usage
Location: Mail API - Finished process single email
Runtime in seconds: 0.2257
Current memory usage: 8.28 MiB / -1
Peak memory usage: 8.49 MiB / -1
Current real memory usage: 10 MiB / -1
Peak real memory usage: 10 MiB / -1
Debug output memory usage
Location: Mail API - Finished process mailbox
Runtime in seconds: 0.2297
Current memory usage: 8.27 MiB / -1
Peak memory usage: 8.49 MiB / -1
Current real memory usage: 10 MiB / -1
Peak real memory usage: 10 MiB / -1
Done checking all mailboxes
That's odd!
SL-Gundam
Posts: 722 Joined: 06 Jul 2011, 14:17
Post
by SL-Gundam » 23 Jul 2018, 22:04
As can been seen from the log, the email was processed to issue ID #3. It could be that this is an already existing issue and that it was added as a note.
Code: Select all
Mailbox: Allgemein
Message: Reporter: 3 - foo@bar.de --> Issue ID: #3
If we need to debug this further, please fix the debug directory error
Code: Select all
Mailbox: Allgemein
Message: Mail debug directory does not exist or is not writable.
robmaster
Posts: 8 Joined: 23 Jul 2018, 16:14
Post
by robmaster » 24 Jul 2018, 04:32
Ahh... all is good. It's working
Thanks a lot!!
Another question, I do not receive any email notifications if a note was added to the ticket or the ticket itself was created.
I noticed that EmailReporting generates a random user name, like Mail61865. But the field for the email address is empty under User Information. So once I'm adding a note to the ticket, the system is unable to send a notification since it's simple not aware of the email address. Is there a work-around; any ideas? Or do I not get any notifications?
Thanks for your great support, appreciate it much!