Sorry for my english it's quite rusty
We have been using MANTIS 2.5.1 for several years without any problems on an old server not backed up.
We decided this summer to set up a correct infrastructure with 3 new environment Production, PreProduction, Integration and the old production environment as a Test/dev environment.
We're experiencing troubles sending emails notification on the new environements (only on new environments).
MANTIS sends an email every 20 minutes (the sending routine is running) so emails pile up in the email buffer table and the MANTIS environment becomes unusable.
That means it no longer responds for certain action like submitting a bug or a bug modification etc.
For the moment we have disabled notifications on the production environment to allow users to use MANTIS but the absence of notifications penalize them.
Does anyone have an idea please?
Environments :
The person who installed the old PROD environment is no longer in thr team and had not done any documentation (to my knowledge).
We recreated an installation procedure by adapting the MANTISBT admin guide to the use of XAMPP.
We first installed the latest version of MANTIS but we got an error message (invalid database schema) while importing the database DUMP of the old Production environment version 2.5.1 .
So we used the closest version we could find is 2.5.2.
Test environnement (Old Production) - EMAIL notifications working
MANTIS 2.5.1
Windows server 2012
XAMPP win32-5.6.31-0-VC11
.NET Framework 3.5
.NET Framework 4.5
Microsoft Visual C++ 2008 Redistributable – x64 9.0.30729.6161
Microsoft Visual C++ 2008 Redistributable – x86 9.0.21022
Microsoft Visual C++ 2008 Redistributable – x86 9.0.30729.4148
Microsoft Visual C++ 2013 Redistributable (x64) – 12.0.30501
Microsoft Visual C++ 2013 Redistributable (x86) – 12.0.30501
Microsoft Visual C++ 2015-2019 Redistributable (x64) – 14.27.29016
Microsoft Visual C++ 2015-2019 Redistributable (x86) – 14.27.29016
3 Environments INTEGRATION, PPD et PRD (New production) - EMAIL notifications not working
MANTIS 2.5.2
Windows server 2016
XAMPP win32-5.6.31-0-VC11
.NET Framework 3.5
.NET Framework 4.5
Microsoft Visual C++ 2008 Redistributable – x64 9.0.30729.6161
Microsoft Visual C++ 2008 Redistributable – x86 9.0.21022
Microsoft Visual C++ 2008 Redistributable – x86 9.0.30729.4148
Microsoft Visual C++ 2015-2019 Redistributable (x64) – 14.28.29325
Microsoft Visual C++ 2015-2019 Redistributable (x86) – 14.27.29016
What we tried :
We ran the MANTIS diagnostic scripts. Diagnostic OK
We checked all the config files of MANTIS, PHP and PHPMyAdmin of the new environments. Everything seems OK extension=php_openssl.dll activated
We aligned all MANTIS, PHP and PHPMyAdmin config files with those of the old PROD (where the problem is not found). Configuration identical (except configuration delta due to the versions) OK
We asked the network team to check for a possible network-side problem. OK, no network-side problem.
We asked the flow team to verify a possible security block. OK no event in the log of the security solution
We imported the PROD database on the preprod. KO the problem of slowness appears and the emails are no longer sent.
We removed mails in the buffer table on PPD and INT. KO the problem does not go away and it takes more than 20 minutes for an email to be sent.
Note: Sometimes the first email that arrives after cleaning the mail buffer table leaves instantly, but the next ones do not leave until about 20 minutes.
We tested sending mail via Telnet command from the PROD machine. OK Emails are sent instantaneously.
We enabled synchronization of MANTIS routines to the environment ($g_email_send_using_cronjob = ON;) and executed the .php email sending routine script by command line. KO the script executes but fails to send the mail.
We imported the dump of the new PROD database on the old PROD. OK Once the buffer table cleaned up everything works on the old PROD environment
We removed the log file and tried several times to reproduce the error with $g_log_level = LOG_EMAIL_VERBOSE; on the PPD environment. KO no error message in the log. We just see that the email sending routine runs in a loop.
We changed the settings for sending mail and timeouts in the MANTIS, PHP and PHPMyAdmin config files. OK disappearance of the problem as soon as the sending of notifications is deactivated
We reviewed the . php files of MANTIS related to sending mail and managing the mail queue. Preliminary review : everything seems OK but we do not know how it works.
As we have strictly the same XAMPP versions on machines (same executable) we tried to copy the entire XAMPP root folder that contains everything (mantis+mysql+php+testlink etc) from the old PROD machine (where the mails work) to the INT machine (where emails do not work).
Sending emails still does not work even with all the files of the old PROD where it works (I remind that sending mail via telnet works well on all machines).
Configuration :
XAMPP 5.6.31 and MANTIS 2.5.2 installations are standard except for the following files we adapted :
- MANTIS config files: « config_inc.php », « custom_constants_inc.php » and « custom_strings_inc.php ».
- PHP config file « php.ini »
- Mysql config files « my.ini » with extension=php_openssl.dll activated.
- phpMyAdmin config file « config.inc.php »
By any chance, I would point out that we also installed TESTLINK on the same machine and linked it to MANTIS.
Testlink config files we modified : « config.inc.php», « custom_config.inc.php » and « mantis/cfg.php ».
MANTIS config_inc.php :
$g_hostname = 'localhost';
$g_db_type = 'mysqli';
$g_database_name = 'bugtracker';
$g_db_username = '*****';
$g_db_password = '*******';
$g_default_timezone = 'Europe/Berlin';
$g_crypto_master_salt = '*********************************************';
# --- anonymous login -----------
# Allow anonymous login
$g_allow_anonymous_login = OFF;
$g_anonymous_account = '*****';
# --- Email Configuration ---
$g_phpMailer_method = PHPMAILER_METHOD_SMTP;
$g_smtp_host = 'smtpgw.*******.loc'; # used with PHPMAILER_METHOD_SMTP
$g_smtp_username = ''; # used with PHPMAILER_METHOD_SMTP
$g_smtp_password = ''; # used with PHPMAILER_METHOD_SMTP
$g_webmaster_email = 'LD-Support-Mantis-***********@*******.com';
$g_from_email = 'no-reply-mantis@*******.fr'; # the "From: " field in emails
$g_return_path_email = 'admin@example.com'; # the return address for bounced mail
$g_from_name = 'Mantis *******;
# $g_email_receive_own = OFF;
# $g_email_send_using_cronjob = ON;
$g_window_title = 'Mantis *******;
# Revised enum string with new status
$g_status_enum_string = '10:new,20:feedback,22:REP_PRECISION_MOA,30:confirmed,32:DEM_PRECISION_AMOA,33:REP_PRECISION_AMOA,40:acknowledged,42:DEM_PRECISION_DEV,43:REP_PRECISION_DEV,50:assigned,60:fixed,80:resolved,81:REOUVERT,82:delivered,84:RECETTE,86:VALIDE,90:closed,91:ABANDON_MOA,92:REJET_AMOA,93:rejected';
$g_log_level = LOG_EMAIL_VERBOSE;
$g_log_destination='file:e:/XAMPP/htdocs/mantis/logs/mantisbt.log';





