I have been trying for days to resolve mail troubles with a new install of mantis. the config is a Windows 2008 server, no IIS/SMTP, running WAMP 2.2.
the guts of my config_inc.php:
$g_log_level = LOG_EMAIL | LOG_EMAIL_RECIPIENT;
$g_log_destination = 'file:e:\mantisbt.log';
$g_allow_signup = ON; //allows the users to sign up for a new account
$g_enable_email_notification = ON; //enables the email messages
$g_phpMailer_method = PHPMAILER_METHOD_SMTP;
$g_validate_email = ON;
$g_check_mx_record = OFF;
$g_allow_blank_email = OFF;
$g_limit_email_domain = OFF;
/* $g_phpMailer_method = 2; */
$g_smtp_host = 'smtp.gmail.com';
$g_smtp_connection_mode = 'ssl';
$g_smtp_SMTPSecure = "ssl";
$g_SMTPAuth = true;
$g_smtp_port = 465 ;
$g_smtp_username =
'jshimota01@gmail.com'; //replace it with your gmail address
$g_smtp_password = 'xxxxxxxxxxxxxxx'; //replace it with your gmail password
$g_administrator_email =
'jshimota01@gmail.com'; //this will be your administrator email address
$g_return_path_email =
'jshimota01@gmail.com'; //this will be your administrator email address
$g_from_email =
'jshimota01@gmail.com'; //this will be your administrator email address
$g_email_send_using_cronjob = OFF;
$g_max_lost_password_in_progress_count = 5000;
$g_webmaster_email =
'jshimota01@gmail.com';
$g_email_receive_own = ON;
$g_debug_email = ON;
Additionally, I've tested Mail(), Sendmail() and SMTP methods in php and no problems. This test php file works flawlessly:
<?php
ini_set("include_path","e:/xampp/htdocs/mantis/library/phpmailer/");
require("class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->SMTPSecure = "ssl";
$mail->Host = "smtp.gmail.com"; // sets GMAIL as the SMTP server
$mail->Port = 465 ; // set the SMTP port
$mail->Username = "jshimota01@gmail.com"; // GMAIL username
$mail->Password = "xxxxxxxxxxx";
$mail->From = "jshimota01@test.com";
$mail->FromName = "Bugtracker";
$mail->AddAddress("jshimota01@gmail.com");
$mail->Subject = "PHPMailer Test Message";
$mail->Body = "Hi! \n\n This is a test e-mail sent through PHPMailer.";
$mail->WordWrap = 50;
if(!$mail->Send()) {
echo 'Message was not sent.';
echo 'Mailer error: ' . $mail->ErrorInfo;
} else {
echo 'Message has been sent.';
}
?>
I switched from a WAMP install (yes, OPENSSL module on, Apache SSL module on) to an XAMPP install - no change. same failure. I've tested with a local SMTP server, no joy either. I've turned off firewalls (of course not needed) and anything else I can think of. I get a 'message sent' when I reset a user password, but no diagnostics, no errors, no info to work with. The documentation of Mantis seems to be written years ago, when I go to MantisBT.org the date on the file is ancient. one discrepency is :
$g_phpMailer_method = PHPMAILER_METHOD_SMTP;
$g_phpMailer_method = 2;
some notes show the numeric version, others say to use the text string.
Another discrepency is reference to 'ssl:smtp.gmail.com' vs. seperating the SSL to its own line.
finally, I've tried fake sendmail, tried to output using Sendmaltodisk (with Xampp) and get zero. I've tried setting to TLS and 587, nothing. Any ideas out there?
Jim Shimota