Please read this if you have problems with emails

Get help from other users here.

Moderators: Contributor, Developer

Re: Please read this if you have problems with emails

Postby wedge » Jan 14, 2013 11:24 am

Well, to add to this thread, I to am having email issues.

Configuration as follows:

$g_allow_signup = Off;
$g_enable_email_notification = ON;
$g_phpMailer_method = PHPMAILER_METHOD_SMTP;
$g_from_email = 'mantis@domain.xxx';
$g_smtp_host = '172.30.65.200';
$g_smtp_username = 'mantis@domain.xxx';
$g_smtp_password = 'xxxx';
$g_smtp_connection_mode = 'tls';
$g_smtp_port = 587;
$g_allow_blank_email = ON;
$g_validate_email = OFF;

What I'm curious about is, if you are using TLS you need to confirm the certificate that is coming from the server. If you are unable to do that, how would you ever send email via this method?

Does someone have some info on this??
wedge
 
Posts: 19
Joined: Jan 08, 2013 10:49 am

Re: Please read this if you have problems with emails

Postby wedge » Jan 14, 2013 1:23 pm

This is now solved for myself.

I don't have much experience using debian and I realized after that 'sendmail' was not installed.

If anyone else is having similar issues using Debian, ensure that sendmail is running


Cheers :)
wedge
 
Posts: 19
Joined: Jan 08, 2013 10:49 am

Re: Please read this if you have problems with emails

Postby nmarotel » Jan 30, 2013 6:25 am

Hello

I'm facing trouble with email configuration

first, I had the following error with the test_mail.php :

Testing Mail -
SYSTEM WARNING: 'stream_socket_enable_crypto(): this stream does not support SSL/crypto' in 'C:\xampp\htdocs\mantis\library\phpmailer\class.smtp.php' line 200


So I changed the connection mode to ssl and the port to 465.
I enabled the php_openssl.dll in my php.ini too and restart Apache (If needed ???)

So here' is my file config_inc.php now :

$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 = 'ssl';
$g_smtp_port = 465;
$g_smtp_username = 'nmarotel@gmail.com'; //replace it with your gmail address
$g_smtp_password = 'xxxxxxx'; //replace it with your gmail password
$g_administrator_email = 'nmarotel@gmail.com'; //this will be your administrator email address


I used the script test_email.php under admin and I have the following error.

Testing Mail - PROBLEMS SENDING MAIL TO: nmarotel@gmail.com. Please check your php/mail server settings.
Email Address: nmarotel@gmail.com


Any suggestions ?
nmarotel
 
Posts: 9
Joined: Jan 23, 2013 9:36 am

Re: Please read this if you have problems with emails

Postby naztri » Feb 19, 2013 8:00 am

I can not walk the mail I have is version 1.0.8 on linux Mantis + office 365. That file I have to modify?
config_defaults_inc.php or config_inc.php. also I have enabled ssl in apache. thanks



No puedo hacer andar el mail la version que tengo es Mantis 1.0.8 sobre linux + office 365. Que archivo tengo que modificar?
config_defaults_inc.php o config_inc.php. tambien tengo activado el ssl en apache. Gracias


config_inc.php

$g_enable_email_notification = ON;
$g_phpMailer_method = PHPMAILER_METHOD_SMTP;
$g_from_email= 'xxxxxx@xxx.com';
$g_smtp_host = 'pod51018.outlook.com';
$g_smtp_port = '587';
$g_smtp_username = 'mantis@xxx.com';
$g_smtp_password = 'password1';
$g_smtp_connection_mode = 'tls';
naztri
 
Posts: 2
Joined: Feb 18, 2013 12:58 pm

Re: Please read this if you have problems with emails

Postby istvanb » Mar 25, 2013 9:01 am

I have updated the topic description for gmail users (mantis has to be authenticated in gmail)
istvanb
 
Posts: 226
Joined: Aug 22, 2010 4:00 pm

Re: Please read this if you have problems with emails

Postby weirpenguin » Apr 05, 2013 2:51 pm

Hi, I am using a mantis 1.2.14 with xampp win32-1.8.1.
I go through the step in the post, able to get a e-mail with the testmail.php, but still unable to get a email from mantis when test on signing up.
So what could the problem?
Thank you.
Below is the config:
<?php
$g_hostname = 'localhost';
$g_db_type = 'mysql';
$g_database_name = 'mantis';
$g_db_username = 'mantis';
$g_db_password = 'mantis';
$g_allow_signup = ON;
$g_send_reset_password = OFF;
$g_session_validation= OFF;
$g_allow_permanent_cookie = OFF;

#------ Email Configuration ------
$g_enable_email_notification = ON;
$g_phpMailer_method = PHPMAILER_METHOD_SMTP;
$g_smtp_host = 'smtp.gmail.com';
$g_smtp_connection_mode = 'ssl';
$g_smtp_port = 465;
$g_smtp_username = '******@gmail.com';
$g_smtp_password = '********';
$g_administrator_email = '******@gmail.com';
$g_webmaster_email = '******@gmail.com';
$g_from_email = '******@gmail.com';
$g_return_email = '******@gmail.com';

#----- Upload and Attachment -----
$g_allow_file_upload = ON;
$g_file_upload_method = DISK;
$g_absolute_path_default_upload_folder = 'C:/MantisUpload/';
$g_max_file_size = 500000000; # in bytes

?>
weirpenguin
 
Posts: 1
Joined: Apr 05, 2013 2:41 pm

Re: Please read this if you have problems with emails

Postby istvanb » Apr 09, 2013 6:58 am

If you are able to get emails with the testmail script then most likely you have a typo in your config_inc.php. You can post your testmail.php if you want, but I am pretty sure that it just a minor mistake. (you have not mentioned specifically but I assume you add your config to the config_inc.php and not the config_defaults_inc.php)
istvanb
 
Posts: 226
Joined: Aug 22, 2010 4:00 pm

Re: Please read this if you have problems with emails

Postby jithinkcs » Apr 16, 2013 1:44 am

Hi,

The following configuration is working with Gmail but not working our mail server ( However we use Outlook and thunderbird as mail clients and its working fine). Please let me know if you face this issue.

$g_allow_signup = OFF;
$g_enable_email_notification = ON;
$g_administrator_email = "webmaster@xxx.com";
$g_webmaster_email = "webmaster@xxx.com";

# the "From: " field in emails
$g_from_email = "Webmaster";

# the return address for bounced mail
$g_return_path_email = "webmaster@xxx.com";

# select the method to mail by:
# 0 - mail()
# 1 - sendmail
# 2 - SMTP
$g_phpMailer_method = PHPMAILER_METHOD_SMTP;

# This option allows you to use a remote SMTP host. Must use the phpMailer script
# Name of smtp host, needed for phpMailer, taken from php.ini

$g_smtp_host ="mail.xxx.com";

# These options allow you to use SMTP Authentication when you use a remote
# SMTP host with phpMailer. If smtp_username is not '' then the username
# and password will be used when logging in to the SMTP server.

$g_smtp_username = "webmaster@xxx.com";
$g_smtp_password = "******";
$g_smtp_connection_mode = 'tls';
$g_smtp_port = 587;

Mantis 1.2.4
PHP 5.x
Apache 2.2

Regards,
JK
jithinkcs
 
Posts: 71
Joined: Jan 29, 2010 3:20 am

Re: Please read this if you have problems with emails

Postby ramesh.g » Jun 03, 2013 12:48 am

Hi people,

The below configuration will work for me in my office. Try this. In config_inc just paste the below code and check the logs.

<?php
$g_hostname = 'localhost';
$g_db_type = 'mysql';
$g_database_name = 'bugtracker';
$g_db_username = 'root';
$g_db_password = '';
$g_phpMailer_method = PHPMAILER_METHOD_SMTP;
$g_smtp_host = 'mail.xxxx.xxx';
$g_smtp_port = 25;
$g_log_level = LOG_EMAIL | LOG_EMAIL_RECIPIENT;
$g_log_destination = 'file:d:/TEMP/mantisbt.log';
?>


Note: g_smtp_host should be your mail server host.
ramesh.g
 
Posts: 5
Joined: Apr 12, 2013 4:55 am

Re: Please read this if you have problems with emails

Postby mehmet » Jul 04, 2013 10:10 am

Hi, I am using a mantis 1.2.15 with xampp
Me too I went through the step in the post, able to get a e-mail with the testmail.php, but still unable to get a email from mantis when test on signing up.
So what could the problem?
Thank you.


Here is the config_inc.php

/************** CONFIG_INC.PHP ***************/

<?php
$g_hostname = 'xxxxxx';
$g_db_type = 'mysql';
$g_database_name = 'bugtracker';
$g_db_username = 'xxxx';
$g_db_password = 'xxxx';

$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 = 'xxxxx';
$g_smtp_connection_mode = 'ssl';
$g_smtp_port = 25;
$g_smtp_username = 'xxxxx'; //replace it with your gmail address
$g_smtp_password = 'xxxxx'; //replace it with your gmail password
$g_administrator_email = 'xxxxx'; //this will be your administrator email address
# $g_from_email = 'xxxxxx';


$g_webmaster_email = "xxxxxxx";

# the "From: " field in emails
$g_from_email = "xxxxxx";

# the return address for bounced mail
$g_return_path_email = "xxxxx";

$g_debug_email = OFF;
$g_log_level = LOG_EMAIL_RECIPIENT;
$g_log_destination = 'file:E:/tmp/mantis.log';

$g_status_enum_string =
'10:new,20:refused,30:acknowledged,40:confirmed,50:assigned,
60:to be tested,70:cancelled,80:resolved,90:closed';
# Status color additions
$g_status_colors['to be tested'] = '#ACE7AE';
$g_status_colors['refused'] = '#E33030';
$g_status_colors['cancelled'] = '#FFFF66';


$g_status_enum_workflow[NEW_]=
'10:new,20:refused,30:acknowledged,40:confirmed,50:assigned,60:to be tested';
$g_status_enum_workflow[REFUSED] =
'10:new,20:refused,30:acknowledged,40:confirmed,50:assigned,60:to be tested';
$g_status_enum_workflow[ACKNOWLEDGED] =
'20:refused,30:acknowledged,40:confirmed,50:assigned,60:to be tested';
$g_status_enum_workflow[CONFIRMED] =
'20:refused,40:confirmed,50:assigned,60:to be tested';
$g_status_enum_workflow[ASSIGNED] =
'20:refused,50:assigned,60:to be tested,90:closed';
$g_status_enum_workflow[CHECK] =
'10:new,20:refused,50:assigned,60:to be tested,80:resolved,90:closed';
$g_status_enum_workflow[RESOLVED] =
'50:assigned,60:to be tested,80:resolved,90:closed';
$g_status_enum_workflow[CLOSED] =
'50:assigned,90:closed';
?>

/***************** TESTMAIL.PHP ******************/


<?php
# MantisBT - a php based bugtracking system

# MantisBT is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# MantisBT is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with MantisBT. If not, see <http://www.gnu.org/licenses/>.

/**
* @package MantisBT
* @copyright Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
* @copyright Copyright (C) 2002 - 2013 MantisBT Team - mantisbt-dev@lists.sourceforge.net
* @link http://www.mantisbt.org
*/
/**
* MantisBT Core API's
*/
require_once( dirname( dirname( __FILE__ ) ) . DIRECTORY_SEPARATOR . 'core.php' );

access_ensure_global_level( config_get_global( 'admin_site_threshold' ) );

$f_mail_test = gpc_get_bool( 'mail_test' );

html_page_top();

?>

<a name="email" id="email" />
<table width="100%" bgcolor="#222222" border="0" cellpadding="20" cellspacing="1">
<tr>
<td bgcolor="#f4f4f4">
<span class="title">Testing Email</span>
<p>You can test the ability for MantisBT to send email notifications with this form. Just click "Send Mail". If the page takes a very long time to reappear or results in an error then you will need to investigate your php/mail server settings (see PHPMailer related settings in your config_inc.php, if they don't exist, copy from config_defaults_inc.php). Note that errors can also appear in the server error log. More help can be found at the <a href="http://www.php.net/manual/en/ref.mail.php">PHP website</a> if you are using the mail() PHPMailer sending mode.</p>
<?php
if( $f_mail_test ) {
echo '<b><font color="#ff0000">Testing Mail</font></b> - ';

# @@@ thraxisp - workaround to ensure a language is set without authenticating
# will disappear when this is properly localized
lang_push( 'english' );

$t_email_data = new EmailData;
$t_email_data->email = config_get_global( 'administrator_email' );
$t_email_data->subject = 'Testing PHP mail() function';
$t_email_data->body = 'Your PHP mail settings appear to be correctly set.';
$t_email_data->metadata['priority'] = config_get( 'mail_priority' );
$t_email_data->metadata['charset'] = 'utf-8';
$result = email_send( $t_email_data );

# $result = email_send( config_get_global( 'administrator_email' ), 'Testing PHP mail() function', 'Your PHP mail settings appear to be correctly set.');

if( !$result ) {
echo ' PROBLEMS SENDING MAIL TO: ' . config_get_global( 'administrator_email' ) . '. Please check your php/mail server settings.<br />';
} else {
echo ' mail() send successful.<br />';
}
}
?>
<form method="post" action="<?php echo $_SERVER['SCRIPT_NAME']?>#email">
Email Address: <?php echo config_get_global( 'administrator_email' );?><br />
<input type="submit" class="button" value="Send Mail" name="mail_test" />
</form>
</td>
</tr>
</table>

<?php

html_page_bottom();


Thanks a lot for your helps in advance !
I hope you can help me because it makes me crazy since 3 days already and I dont want to loose time on that no more :(
mehmet
 
Posts: 10
Joined: Jul 03, 2013 2:51 am

Re: Please read this if you have problems with emails

Postby ajitdubey » Aug 28, 2013 7:22 am

Hi All,

I was able to fix email notification issue for Mantis hosted on Godaddy. Following setting helped me to send email notification.

$g_use_phpMailer = ON;
$g_phpMailer_method = PHPMAILER_METHOD_SMTP;
$g_smtp_host = 'smtpout.secureserver.net';
# --- $g_smtp_connection_mode = 'ssl';
$g_smtp_port = 80;

:-) :) :D
ajitdubey
 
Posts: 1
Joined: Aug 25, 2013 9:28 am

Re: Please read this if you have problems with emails

Postby vernekarsiddharth » Oct 30, 2013 2:32 am

sir i am also having a problem in configuring mailing settings
i am using Xampp and tried what have been mentioned up to now in this conversion for configuring g-mail. but not a single thing worked .
plz help asps...
vernekarsiddharth
 
Posts: 1
Joined: Oct 30, 2013 2:25 am

Email issues after upgrading to 1.2.16

Postby madusumi » Feb 26, 2014 12:56 pm

We were able to run Mantis 1.2.15 with no issues. We upgraded to 1.2.16 last friday and from then unable to receive emails for new issues, new users etc
Tried running the testmail_php and was able to receive a test mail. mantis database email table contains a few entries (I think these are the emails that are trying to be sent out).Tired using a dummy gmail account, but still no luck.

Currently running a test environment of mantis 1.2.16 and have no issues receiving email notifications. Current cofig_inc.php setting are below
$g_enable_email_notification = ON;
$g_allow_signup = ON;
$g_phpMailer_method = PHPMAILER_METHOD_SMTP;
$g_smtp_host = 'mail.company.com';
$g_smtp_port = 25;
$g_enable_email_notification = ON;
$g_email_send_using_cronjob = OFF;
madusumi
 
Posts: 1
Joined: Feb 26, 2014 12:10 pm

Re: Please read this if you have problems with emails

Postby Draco18s » May 27, 2014 3:44 pm

Just because emails were a problem for me, recently, I thought I'd drop by with another solution:

(I also realize this is slightly spammy, but I'm not a shill, just someone who had trouble and found a solution)

For some reason, I was unable to send email via my own company email address, either by using our server's SMTP credentials or by using Verizon's outgoing relay server. As soon as I got a Mandrill account and used those SMTP details, bam, everything worked. 12,000 emails a month will go out and I don't have to pay a dime to anyone.
Draco18s
 
Posts: 5
Joined: May 27, 2014 1:59 pm

Re: Please read this if you have problems with emails

Postby nitin » Nov 19, 2014 12:57 am

Hi,

I have made given changes and message sent successfully to gmail for testmail.php script.

But I am facing difficulties in configuring mail in my environment.

Can you please let me know which files needs to be changes???

every reply is appreciated.

Thanks.
nitin
 
Posts: 2
Joined: Nov 13, 2014 5:38 am

PreviousNext

Return to Help

Who is online

Users browsing this forum: Bing [Bot] and 11 guests