Email not working on WAMP server

General discussion of Mantis.

Moderators: Developer, Contributor

Email not working on WAMP server

Postby Testinguser » May 10, 2012 7:54 am

Hello Guys,

I am stuck in one for problem with mantis. Please help me as early as possible. It's very critical to one of my project.

Techincal details are as follow:-

I am using following configuration in my system.
1) WAMP 2.2 Server
2) Mantis 1.2.8
3) Windows 2008 Server

Along with above, I have installed SMTP Server on windows.

When I tired to send mail from system using Java/PHP mailer, the mail is floating. But when trying with Manis application mails are floating i.e. on any change mails are recieved by user.

Also, I did the changes in only one file config_inc.php.

Below are the changes which I did in config_inc.php

<?php
$g_phpMailer_method = PHPMAILER_METHOD_SMTP;
$g_smtp_host = 'SERVER NAME';
$g_smtp_username = 'abc@xyz.com';
$g_smtp_password = '';
$g_administrator_email = ''abc@xyz.com';
$g_webmaster_email = 'abc@xyz.com';
$g_from_name = 'Mantis Bug Tracker';
$g_from_email = 'abc@xyz.com';
$g_return_path_email = 'abc@xyz.com';
$g_email_receive_own = OFF;
$g_email_send_using_cronjob = OFF;
$g_smtp_port = '25';
$g_smtp_connection_mode = 'ssl';
?>

When I checked in mantis_email_table in database. I got the enteries of events(triggers) which I did in mantis but emails were not reached to user. In table it shown me email has sent to all user which are present in mantis.

PLEASE HELP ME, IT'S VERY URGENT.

Please let me know where we need to changes to get emails. Also, let me know how can I check SMTP is configured correctly.
Testinguser
 
Posts: 1
Joined: May 10, 2012 7:37 am

Re: Email not working on WAMP server

Postby enzoweb » May 13, 2012 8:29 pm

Not sure if this will help:

Can you send mail outside of Mantis from the server? ie is the mail working at all?

I had trouble because our internal mail was not set up correctly, so I resorted to using gmail. I first set up a gmail account called 'xxxissuestracker' (xxx is our company name).

I then put this in my congfig_inc.php file:

$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_smtp_host = 'smtp.gmail.com';
$g_smtp_connection_mode = 'tls';
$g_smtp_port = 587;
$g_smtp_username = 'xxxissuestracker@gmail.com'; //replace it with your gmail address
$g_smtp_password = 'password'; //replace it with your gmail password

Make sure that in the "Manage" / "Manage Users" screen you have checked the right boxes for email notifications.

This works for me.
enzoweb
 
Posts: 8
Joined: Feb 16, 2012 11:34 pm

Re: Email not working on WAMP server

Postby jefbro98 » May 25, 2012 11:10 am

I had a similar problem. I ended up removing all authorization and encryption parameters from the config file. It started working for me because the e-mail server was set up to accept anonymous connections.
Knowledge makes the world go 'round!
jefbro98
 
Posts: 3
Joined: May 24, 2012 5:10 pm

Re: Email not working on WAMP server

Postby jshimota » Sep 20, 2012 5:33 pm

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
jshimota
 
Posts: 1
Joined: Sep 20, 2012 4:04 pm


Return to General Discussion

Who is online

Users browsing this forum: Google [Bot], MSN [Bot] and 4 guests

cron