Page 4 of 7

Re: Please read this if you have problems with emails

Posted: 14 Jan 2013, 16:24
by wedge
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??

Re: Please read this if you have problems with emails

Posted: 14 Jan 2013, 18:23
by wedge
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 :)

Re: Please read this if you have problems with emails

Posted: 30 Jan 2013, 11:25
by nmarotel
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 ?

Re: Please read this if you have problems with emails

Posted: 19 Feb 2013, 13:00
by naztri
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';

Re: Please read this if you have problems with emails

Posted: 25 Mar 2013, 14:01
by istvanb
I have updated the topic description for gmail users (mantis has to be authenticated in gmail)

Re: Please read this if you have problems with emails

Posted: 05 Apr 2013, 19:51
by weirpenguin
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

?>

Re: Please read this if you have problems with emails

Posted: 09 Apr 2013, 11:58
by istvanb
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)

Re: Please read this if you have problems with emails

Posted: 16 Apr 2013, 06:44
by jithinkcs
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

Re: Please read this if you have problems with emails

Posted: 03 Jun 2013, 05:48
by ramesh.g
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.

Re: Please read this if you have problems with emails

Posted: 04 Jul 2013, 15:10
by mehmet
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 :(

Re: Please read this if you have problems with emails

Posted: 28 Aug 2013, 12:22
by ajitdubey
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

Re: Please read this if you have problems with emails

Posted: 30 Oct 2013, 07:32
by vernekarsiddharth
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...

Email issues after upgrading to 1.2.16

Posted: 26 Feb 2014, 17:56
by madusumi
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;

Re: Please read this if you have problems with emails

Posted: 27 May 2014, 20:44
by Draco18s
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.

Re: Please read this if you have problems with emails

Posted: 19 Nov 2014, 05:57
by nitin
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.