Emails not processed to a ticket

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

Moderators: Developer, Contributor

Post Reply
robmaster
Posts: 8
Joined: Jul 23, 2018 11:14 am

Emails not processed to a ticket

Post by robmaster » Jul 23, 2018 11:24 am

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: 566
Joined: Jul 06, 2011 9:17 am

Re: Emails not processed to a ticket

Post by SL-Gundam » Jul 23, 2018 11:55 am

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: Jul 23, 2018 11:14 am

Re: Emails not processed to a ticket

Post by robmaster » Jul 23, 2018 12:49 pm

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

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

Re: Emails not processed to a ticket

Post by SL-Gundam » Jul 23, 2018 1:31 pm

Everything looks good so nothing weird there.

Are there any unread emails in the mailbox for EmailReporting to process?
Please also enable "Show the memory usage at various stages of the email processing process" and run it again

robmaster
Posts: 8
Joined: Jul 23, 2018 11:14 am

Re: Emails not processed to a ticket

Post by robmaster » Jul 23, 2018 2:46 pm

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: 566
Joined: Jul 06, 2011 9:17 am

Re: Emails not processed to a ticket

Post by SL-Gundam » Jul 23, 2018 5:04 pm

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: Jul 23, 2018 11:14 am

Re: Emails not processed to a ticket

Post by robmaster » Jul 23, 2018 11:32 pm

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!

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

Re: Emails not processed to a ticket

Post by SL-Gundam » Jul 24, 2018 12:19 am

That user is a fallback account that is used when no proper user can be found. matching is based on the senders email address

I suggest you look at the EmailReporting Configuration Options (Manage -> Manage Email Reporting ->
Manage Configuration Options)
There you will find a section called "Issue reporter configuration options"
http://www.mantisbt.org/wiki/doku.php/m ... e_reporter
http://www.mantisbt.org/wiki/doku.php/m ... l_reporter
http://www.mantisbt.org/wiki/doku.php/m ... eporter_id
http://www.mantisbt.org/wiki/doku.php/m ... uto_signup

Another option that might be important is: http://www.mantisbt.org/wiki/doku.php/m ... eceive_own

Keep in mind that EmailReporting is designed to work just like MantisBT. So if you add a note to MantisBT manually and a note via EmailReporting to the same issue, the same users should be notified

Post Reply