Email Configuration

General discussion of Mantis.

Moderators: Contributor, Developer

Email Configuration

Postby Tarlix » Nov 24, 2017 9:56 am


I'm using Mantis for a while and suddenly (probably somebody updated something, but no one said anything) in my company it just stopped sending emails.
I'm about 2 weeks now searching what could have happened on our server, so I configured the enviroment on my own machine and the problem persists.

Yesterday could make it work, but I had to change mantis email_api.php, and so, that's why I'm asking if there's any other way to fix the problem without change this code (thinking about future compatibility changes, or system backup).

So, this is what i've done:

$g_phpMailer_method = PHPMAILER_METHOD_SMTP;
$g_smtp_host = '';
$g_smtp_username = '';
$g_smtp_password = 'mypass';
$g_smtp_connection_mode = 'tls';
$g_smtp_port = 587;
$g_from_name = 'Mantis Bug Tracker';
$g_administrator_email = '';
$g_webmaster_email = '';
$g_return_path_email = '';
$g_from_email = '';
$g_validate_email = ON;
$g_log_destination = 'file:C:\mantisbt.log';


Added in function email_send( EmailData $p_email_data ):
Code: Select all
   $t_mail->SMTPOptions = array(
    'ssl' => array(
        'verify_peer' => false,
        'verify_peer_name' => false,
        'allow_self_signed' => true

My system versions:
Windows server 2012;
MantisBT Version 1.3.1
PHP Version 5.6.18
Schema Version 209
ADOdb Version 5.20.4

Without this piece of code I got the following error:
Warning: stream_socket_enable_crypto(): SSL operation failed with code 1.
OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

I saw on github this pull-request which would create a configuration that could solve my problem, I think.
Posts: 2
Joined: Nov 24, 2017 9:39 am

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 7 guests