Please read this if you have problems with emails

Get help from other users here.

Moderators: Developer, Contributor

violab
Posts: 3
Joined: 28 Nov 2017, 18:31

Re: Please read this if you have problems with emails

Post by violab »

Hi ,
I ve tried to configure email for our company mantis bug tracker but I m unable to get emails. I ve done the same exact setup, what could be the issue, Where do I specify the email subject and body and all?
Thanks
rbngan
Posts: 3
Joined: 01 Feb 2018, 03:56

Re: Please read this if you have problems with emails With Godaddy and Gmail/G-Suite

Post by rbngan »

I finally found the solution to get the email to work with GoDaddy and Gmail. The problem was that we are on Goddady's "Shared" servers and they block gmail SMTP ports 465 and 587. So you still have to use SMTP but use localhost with no ID/PW on port 25 and no authentication. Here is my config:

Code: Select all

# --- Email Configuration --- Godaddy shared hosting servers block port 465 and 587, must be sent SMTP with localhost ID blank, PW Blank, No Authentication.
$g_phpMailer_method	= PHPMAILER_METHOD_SMTP; 			# PHPMAILER_METHOD_MAIL; # or PHPMAILER_METHOD_SMTP, PHPMAILER_METHOD_SENDMAIL
$g_smtp_host		= 'localhost';					# 'localhost', used with PHPMAILER_METHOD_SMTP
# $g_smtp_username	= '';						# Not used on Godaddy shared hosting servers.
# $g_smtp_password	= '';						# Not used on Godaddy shared hosting servers.
$g_smtp_connection_mode = '';						# Authentication not required on Godaddy shared hosting servers.
$g_smtp_port 		= 25;						# Non secure from Godaddy shared hosting servers.
$g_webmaster_email	= 'youradmin@yourdomain.com';			# 
$g_from_email           = 'noreply@@yourdomain.com';			# the "From: " field in emails
$g_return_path_email    = 'adminadmin@y@yourdomain.com';		# the return address for bounced mail
$g_from_name		= 'YourAdminName';				# Name that shows up in email correspondence 
$g_email_receive_own	= ON;						# Default Off, 
# $g_email_send_using_cronjob = OFF;
Psy_duck
Posts: 5
Joined: 08 Apr 2018, 21:54

Re: Please read this if you have problems with emails

Post by Psy_duck »

Hello. I migrated mantis (version 1.2.9) from windows server 2003 to Centos 7, [i'm didnt upgrade mantis, people are disagree with new GUI].
I have problem with SMTP mail sending.
All mail config wrote in "config_defaults_inc" :

Code: Select all

$g_administrator_email = '-@gmail.com';

$g_webmaster_email      = '-@gmail.com';
$g_from_email           = '-@gmail.com';
$g_from_name            = 'Mantis Bug Tracker';
$g_return_path_email    = '-@gmail.com';
$g_enable_email_notification    = ON;
$g_default_notify_flags = array('reporter'  => ON,
                                'handler'   => ON,
                                'monitor'   => ON,
                                'bugnotes'  => ON,
                                'explicit'  => ON,
                                'threshold_min' => NOBODY,
                                'threshold_max' => NOBODY);

$g_notify_flags['new']  = array('bugnotes'  => OFF,
                                'monitor'   => OFF);
$g_notify_flags['monitor'] = array( 'reporter'  => OFF,
                                    'handler'   => OFF,
                                    'monitor'   => OFF,
                                    'bugnotes'  => OFF,
                                    'explicit'  => ON,
                                    'threshold_min' => NOBODY,
                                    'threshold_max' => NOBODY);

$g_email_receive_own    = OFF;
$g_validate_email       = ON;
$g_check_mx_record      = OFF;
$g_allow_blank_email    = OFF;
$g_limit_email_domain   = OFF;
$g_show_user_email_threshold = NOBODY;
$g_show_user_realname_threshold = NOBODY;
$g_mail_priority        = 3;
$g_phpMailer_method     = PHPMAILER_METHOD_SMTP;
$g_smtp_host            = 'corporatemail.---';
$g_smtp_username = '-----@----';

$g_smtp_password = '-----';

$g_smtp_connection_mode = '';

$g_smtp_port = 25;

$g_email_send_using_cronjob = OFF;
25 port is open, postfix install. What's need for work SMTP yet? SMTP server is not gmail and was work by 25 port.
Psy_duck
Posts: 5
Joined: 08 Apr 2018, 21:54

Re: Please read this if you have problems with emails

Post by Psy_duck »

Install sendmail, open to setsebool - all works! Is it right solution?

# yum install sendmail
# setsebool -P httpd_can_sendmail=on
Psy_duck wrote: 09 Apr 2018, 10:21 Hello. I migrated mantis (version 1.2.9) from windows server 2003 to Centos 7, [i'm didnt upgrade mantis, people are disagree with new GUI].
I have problem with SMTP mail sending.
All mail config wrote in "config_defaults_inc" :

Code: Select all

$g_administrator_email = '-@gmail.com';

$g_webmaster_email      = '-@gmail.com';
$g_from_email           = '-@gmail.com';
$g_from_name            = 'Mantis Bug Tracker';
$g_return_path_email    = '-@gmail.com';
$g_enable_email_notification    = ON;
$g_default_notify_flags = array('reporter'  => ON,
                                'handler'   => ON,
                                'monitor'   => ON,
                                'bugnotes'  => ON,
                                'explicit'  => ON,
                                'threshold_min' => NOBODY,
                                'threshold_max' => NOBODY);

$g_notify_flags['new']  = array('bugnotes'  => OFF,
                                'monitor'   => OFF);
$g_notify_flags['monitor'] = array( 'reporter'  => OFF,
                                    'handler'   => OFF,
                                    'monitor'   => OFF,
                                    'bugnotes'  => OFF,
                                    'explicit'  => ON,
                                    'threshold_min' => NOBODY,
                                    'threshold_max' => NOBODY);

$g_email_receive_own    = OFF;
$g_validate_email       = ON;
$g_check_mx_record      = OFF;
$g_allow_blank_email    = OFF;
$g_limit_email_domain   = OFF;
$g_show_user_email_threshold = NOBODY;
$g_show_user_realname_threshold = NOBODY;
$g_mail_priority        = 3;
$g_phpMailer_method     = PHPMAILER_METHOD_SMTP;
$g_smtp_host            = 'corporatemail.---';
$g_smtp_username = '-----@----';

$g_smtp_password = '-----';

$g_smtp_connection_mode = '';

$g_smtp_port = 25;

$g_email_send_using_cronjob = OFF;
25 port is open, postfix install. What's need for work SMTP yet? SMTP server is not gmail and was work by 25 port.
skeating
Posts: 1
Joined: 09 Apr 2018, 14:42

Re: Please read this if you have problems with emails

Post by skeating »

Hello

I am running Mantis 1.2.11 on QNAP QTS 4.3.3.0299, and have configured the config_inc.php file, but still cannot send email. Is there an issue between the version of Mantis and QNAP I am running? I was told when I took this over that running on the previous version of QNAP, Mantis would send mail.
vpatil
Posts: 2
Joined: 20 Jul 2018, 09:58

Will you please help me to email configuration

Post by vpatil »

$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 = 'vaishalipatil905@gmail.com'; //replace it with your gmail address
$g_smtp_password = 'my own personal password'; //replace it with your gmail password
$g_administrator_email = 'vaishalipatil1193@gmail.com'; //this will be your administrator email address



i copied the above code in config_inc.php file
wilkie97
Posts: 2
Joined: 01 Aug 2018, 17:02

Re: Please read this if you have problems with emails

Post by wilkie97 »

The configuration I use is the same as vpatil's prior post however I am not sure about what type of environment he is running. Here are the relevant details below.

Server:
1. Windows Server 2008 R2 (x64) 16 GB RAM with 2.9 GHz Dual Xeon Processors
2. Running: Internet Information Services IIS 7.0
3. Running: XAMPP
** Installed PHP
** Installed MySQL
4. MantisBT Hosted: inetpub\wwwroot\MantisBT
** ConfigFile Located: inetpub\wwroot\MantisBt\Config\config.inc.php

Note: Services not used from XAMPP (Apache, Filezilla, Mercury, Tomcat)


I have modified the config.inc.php to include the following settings.

# --- Email Configuration ---
$g_allow_signup = ON;
$g_enable_email_notification = ON;
$g_phpMailer_method = PHPMAILER_METHOD_SMTP;
$g_smtp_host = 'smtp.gmail.com';
$g_smtp_connection_mode = 'tls';
$g_smtp_port = 587;
# --- Replace (-----------) With Your Information---
$g_smtp_username = '-----------@gmail.com';
$g_smtp_password = '-----------';
$g_administrator_email = '-----------@gmail.com';

-------------------------
ERROR RECEIVED: when attempting to click something that needs to send an email. (Reset Password or when signing up for new account)

500 Internal Server Error
There is a problem with the resource you are looking for, and it cannot be displayed
wilkie97
Posts: 2
Joined: 01 Aug 2018, 17:02

Re: Please read this if you have problems with emails

Post by wilkie97 »

My issue was related to the McAfee Suite. Issue for me is resolved.
Marcoco
Posts: 1
Joined: 20 Aug 2018, 14:44

Re: Please read this if you have problems with emails

Post by Marcoco »

Grrrr Sendmail was the problem. I have not installed it! Thank you for the help!
rancor1223
Posts: 1
Joined: 24 Oct 2018, 06:29

Re: Please read this if you have problems with emails

Post by rancor1223 »

Along with 2 other users who didn't receive any answer here, I'm also missing the `Mail.php` file (that is referenced in the testmail.php). What gives?

I even redownloaded the 2.18.0 version zip and it's not there.

But then again, mail.php doesn't seem to be referenced anywhere in the files either?
Guzman
Posts: 2
Joined: 11 Jan 2019, 18:55

Re: Please read this if you have problems with emails

Post by Guzman »

E intentado todas las maneras le e movido pero sige isn enviar los correos necesito ayuda por favor la verion que tengo es 2.19.0 lo descarge en un windows 10 y descarge el xampp increso al archivo config_defaults_inc pero $g_enable_email_notification = ON; ya se encuentra habiltada por favor donde mas puedo moverle para que pueda enviar correos por favor
georgerc
Posts: 3
Joined: 11 Feb 2019, 14:13

Re: Please read this if you have problems with emails

Post by georgerc »

Por favor, necesito ayuda con el Mantisbt versión 2.17.1.
No puedo configurar con el correo office 365.
Alguien que pueda ayudarme por favor.
¿Qué puertos tienen que estar habilitados? 25, 465, 587?
cas
Posts: 1581
Joined: 11 Mar 2006, 16:08
Contact:

Re: Please read this if you have problems with emails

Post by cas »

Georgerc, Please do not double postcry: . I already poiunted you in the right direction in another message. :
Please use English.
EstebanLB01
Posts: 6
Joined: 19 Feb 2019, 19:19

Re: Please read this if you have problems with emails

Post by EstebanLB01 »

Edit: nevermind, I missed a semicolon...
But now that I'm here, I do have problems using email, my first test was to send a reset password email to the existing accounts but nothing is received. Where should I start looking?

Hello all, new player here. I just installed Mantis with Apache in Windows Server 2012, Everything working as intended, EXCEPT when I get to the part of mail configuration. I added users directly to the database and tested them, created issues, projects, etc. But when I enable mail in the config, I get a blank page. This is part of the config I'm using:

Code: Select all

#--- Anonymous Access / Signup ---
$g_allow_signup				= ON;
#$g_allow_anonymous_login	= ON;
#$g_anonymous_account		= 'Guest';

#--- Email Configuration ---
$g_phpMailer_method		= PHPMAILER_METHOD_SMTP # PHPMAILER_METHOD_MAIL or PHPMAILER_METHOD_SENDMAIL
$g_smtp_host			= 'smtp.gmail.com';			# used with PHPMAILER_METHOD_SMTP
$g_smtp_username		= 'mantisbt.company@gmail.com';					# used with PHPMAILER_METHOD_SMTP
$g_smtp_password		= 'sjr84hng73';					# used with PHPMAILER_METHOD_SMTP
$g_webmaster_email      = 'mantisbt.company@gmail.com';
$g_from_email           = 'mantisbt.company@gmail.com';	# the "From: " field in emails
$g_return_path_email    = 'mantisbt.company@gmail.com';	# the return address for bounced mail
$g_from_name			= 'Company Mantis Bug Tracker';
$g_smtp_port			= 587;
$g_smtp_connection_mode = 'tls';
$g_enable_email_notification	= ON;
$g_validate_email		= ON;
The line that brings the problem is the method, $g_phpMailer_method = PHPMAILER_METHOD_SMTP. Commenting it (and leaving the rest set) breaks Mantis and I just get a blank page. The gmail account is working fine from the server, wich is located in a datacenter (perhaps the datacenter has some settings blocked that I need to check). Openssl and SOAP are enabled in PHP
There are my PHP.ini file settings

Code: Select all

engine = On
short_open_tag = Off
precision = 14
output_buffering = 4096
zlib.output_compression = Off
implicit_flush = Off
unserialize_callback_func =
serialize_precision = -1
disable_functions =
disable_classes =
zend.enable_gc = On
expose_php = On
max_execution_time = 30
max_input_time = 60
memory_limit = 128M
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
display_errors = Off
display_startup_errors = Off
log_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = On
html_errors = On
error_log = syslog
variables_order = "GPCS"
request_order = "GP"
register_argc_argv = Off
auto_globals_jit = On
post_max_size = 8M
auto_prepend_file =
auto_append_file =
default_mimetype = "text/html"
default_charset = "UTF-8"
doc_root =
user_dir =
extension_dir = "ext"
enable_dl = Off
file_uploads = On
upload_max_filesize = 2M
max_file_uploads = 20
allow_url_fopen = On
allow_url_include = Off
default_socket_timeout = 60
extension=fileinfo
extension=mbstring
extension=mysqli
extension=openssl
extension=soap
cli_server.color = On
pdo_mysql.default_socket=
SMTP = localhost
smtp_port = 25
mail.add_x_header = Off
odbc.allow_persistent = On
odbc.check_persistent = On
odbc.max_persistent = -1
odbc.max_links = -1
odbc.defaultlrl = 4096
odbc.defaultbinmode = 1
ibase.allow_persistent = 1
ibase.max_persistent = -1
ibase.max_links = -1
ibase.timestampformat = "%Y-%m-%d %H:%M:%S"
ibase.dateformat = "%Y-%m-%d"
ibase.timeformat = "%H:%M:%S"
mysqli.max_persistent = -1
mysqli.allow_local_infile = 0
mysqli.allow_persistent = On
mysqli.max_links = -1
mysqli.default_port = 3306
mysqli.default_socket =
mysqli.default_host =
mysqli.default_user =
mysqli.default_pw =
mysqli.reconnect = Off
mysqlnd.collect_statistics = On
mysqlnd.collect_memory_statistics = Off
pgsql.allow_persistent = On
pgsql.auto_reset_persistent = Off
pgsql.max_persistent = -1
pgsql.max_links = -1
pgsql.ignore_notice = 0
pgsql.log_notice = 0
bcmath.scale = 0
session.save_handler = files
session.use_strict_mode = 0
session.use_cookies = 1
session.use_only_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.cookie_httponly =
session.cookie_samesite =
session.serialize_handler = php
session.gc_probability = 1
session.gc_divisor = 1000
session.gc_maxlifetime = 1440
session.referer_check =
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0
session.sid_length = 26
session.trans_sid_tags = "a=href,area=href,frame=src,form="
session.sid_bits_per_character = 5
zend.assertions = -1
tidy.clean_output = Off
soap.wsdl_cache_enabled=1
soap.wsdl_cache_dir="/tmp"
soap.wsdl_cache_ttl=86400
soap.wsdl_cache_limit = 5
ldap.max_links = -1
EstebanLB01
Posts: 6
Joined: 19 Feb 2019, 19:19

Re: Please read this if you have problems with emails

Post by EstebanLB01 »

I just checked everything, openssl and soap extensions enabled in PHP.ini, ssl moduled enabled in Apache config, restarted both service and server, but email is stil not working. The check program shows me this

Code: Select all

Email
webmaster_email configuration option has a valid email address specified 	FAIL
from_email configuration option has a valid email address specified 	FAIL
return_path_email configuration option has a valid email address specified 	FAIL
Could it be that the datacenter where the server is located is blocking traffic for SMTP on that port?
Post Reply