Test of Mail-Box Fails

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

Moderators: Developer, Contributor

Post Reply
ToMa
Posts: 4
Joined: 20 Apr 2018, 06:33

Test of Mail-Box Fails

Post by ToMa »

We have two Mantis-Installations (on different VMs):
1) MantisBT 1.2.15 & Email Reporting 0.9.0-DEV
2) MantisBT 2.13.1 & Email Reporting 0.10.0-DEV

Giving the credentials for an IMAP mailbox and doing a "complete test" in the WebGUI runs without problems in 1) but not in 2).
For the newer installation it takes quite long but does not give any feedback from the system - it just ends after some time without a message/a blank page.

What can I do to at least get any error message for "Email Reporting 0.10.0-DEV"?
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: Test of Mail-Box Fails

Post by SL-Gundam »

IMAP support in 0.10.X should be better then 0.9.0 so this is weird

In general MantisBT not returning anything means everything works fine. Though this was changed in 0.9.3. Now it should always return something so that the user knows whether it is successful or not

Please make sure you are at least using a 0.10.1-DEV version newer then 25-02-2018.
https://github.com/mantisbt-plugins/Ema ... 63832be625
ToMa
Posts: 4
Joined: 20 Apr 2018, 06:33

Re: Test of Mail-Box Fails

Post by ToMa »

Thanks a lot for the reply!

Just to be on the safe side I copied a fresh download from your link into the folder (and re-started the Apache). - The "answer" on a "complete test" (which produces some lines of report on the old system saying everything is fine) is still the same: a thin pink box/line in the upper part of a blank page (all menues at the left and top look fine as before).

Is there any log-function or manual procedure I could generate some information on the bug?
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: Test of Mail-Box Fails

Post by SL-Gundam »

In that case EmailReporting has encountered an error.

I suggest you add the following to your MantisBT config_inc.php and repeat the test

Code: Select all

	# --- detailed error messages -----
	$g_show_detailed_errors	= ON;

	$g_display_errors = array(
		E_WARNING => 'halt',
		E_NOTICE => 'halt',
		E_USER_ERROR => 'halt',
		E_USER_WARNING => 'halt',
		E_USER_NOTICE => 'halt'
	);
 
Please let me know what the error is so that we can patch it
ToMa
Posts: 4
Joined: 20 Apr 2018, 06:33

Re: Test of Mail-Box Fails

Post by ToMa »

Thank you for the code! I inserted it in config_inc and it changed my login-screen (showing: "Warnung: „show_detailed_errors“ ist nicht auf den Standardwert (OFF) gesetzt...." - so it seems to work). But the "complete test" of the mailbox ends with a thick line (in grey) - as before.

So any other idea what I could do to get some more info about the bug? Maybe setup a complete new naked system without any data? Our Apache and MySQL is provided via XAMPP (if that could be of relevance).
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: Test of Mail-Box Fails

Post by SL-Gundam »

A successful complete test should look something like this:
Untitled.png
Untitled.png (31.79 KiB) Viewed 7622 times
The green box would be red on failure

The only thing i can think of now is that $g_show_detailed_errors has been set properly, but $g_display_errors is overwritten by the database (Please check the configuration report).

In the mean time i advise you to enable EmailReporting's debug mode. This will show specific events that are executed. That way we can check the last event that was processed
ToMa
Posts: 4
Joined: 20 Apr 2018, 06:33

Re: Test of Mail-Box Fails

Post by ToMa »

The debug mode of the Email-Reporting-Plugin gives this (small changes of Server & PW):
"""
array(14) {
["enabled"]=>
int(1)
["description"]=>
string(21) "ReportingEMail"
["mailbox_type"]=>
string(4) "IMAP"
["hostname"]=>
string(11) "mail.server.de"
["port"]=>
int(993)
["encryption"]=>
string(4) "None"
["ssl_cert_verify"]=>
int(1)
["erp_username"]=>
string(26) "reporting@server.de"
["erp_password"]=>
string(12) "XXXX"
["auth_method"]=>
string(5) "LOGIN"
["project_id"]=>
int(89)
["global_category_id"]=>
int(1)
["imap_basefolder"]=>
string(0) ""
["imap_createfolderstructure"]=>
int(0)
}
"""
Where would I find the database config log you mentioned? Ist it "my.ini" or "mysql_error.log"? For what should I search in this file which could prohibit the correct display of the test result?
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: Test of Mail-Box Fails

Post by SL-Gundam »

Please take a screenshot and post it here so that i can better understand the problem
  • If no emails are present in the mailbox
  • you perform a complete test
  • debug mode is enabled
If all of the above is true then you should have seen something like this

Code: Select all

Debug output memory usage
Location: Mail API - Finished __construct
Runtime in seconds: 0
Current memory usage: 1.8 MiB / 128M
Peak memory usage: 1.8 MiB / 128M
Current real memory usage: 2 MiB / 128M
Peak real memory usage: 2 MiB / 128M

array(14) {
["enabled"]=>
int(1)
["description"]=>
string(21) "ReportingEMail"
["mailbox_type"]=>
string(4) "IMAP"
["hostname"]=>
string(11) "mail.server.de"
["port"]=>
int(993)
["encryption"]=>
string(4) "None"
["ssl_cert_verify"]=>
int(1)
["erp_username"]=>
string(26) "reporting@server.de"
["erp_password"]=>
string(12) "XXXX"
["auth_method"]=>
string(5) "LOGIN"
["project_id"]=>
int(89)
["global_category_id"]=>
int(1)
["imap_basefolder"]=>
string(0) ""
["imap_createfolderstructure"]=>
int(0)
}

Debug output memory usage
Location: Mail API - Start process mailbox
Runtime in seconds: 0.0018
Current memory usage: 1.8 MiB / 128M
Peak memory usage: 1.82 MiB / 128M
Current real memory usage: 2 MiB / 128M
Peak real memory usage: 2 MiB / 128M

Debug output memory usage
Location: Mail API - Finished process mailbox
Runtime in seconds: 1.0678
Current memory usage: 1.81 MiB / 128M
Peak memory usage: 1.83 MiB / 128M
Current real memory usage: 2 MiB / 128M
Peak real memory usage: 2 MiB / 128M
Post Reply