Page 5 of 7

Re: Please read this if you have problems with emails

Posted: 16 May 2015, 00:20
by bernard_13012
For several hours, I tried everything to make MantisBT sends a message with gmail SMTP to the new user that I created. The script found at this url helped me to find a solution: https://github.com/PHPMailer/PHPMailer/ ... tions.phps
My solution: I do not use any more SMTP. The only "MantisBT Email Settings" settings on my config_inc.php file are:

Code: Select all

   /***************************
	 * MantisBT Email Settings *
	 ***************************/
	$g_allow_signup = ON;
	$g_enable_email_notification = ON;
	$g_email_receive_own = ON;
	$g_validate_email = ON;
	$g_use_phpMailer = ON;
	$g_phpMailer_method  = PHPMAILER_METHOD_MAIL;  // not SMTP!!!
	$g_administrator_email = '<my gmail account name>@gmail.com';
	$g_webmaster_email	 = '<my gmail account name>@gmail.com';
	$g_from_email = '<my gmail account name>@gmail.com';
	$g_from_name = 'Mantis Bug Tracker';
	$g_return_path_email = '<my gmail account name>@gmail.com';
And it works, now! :D
Thank you to all contributors who allowed me to move forward and to finally find my solution.

Re: Please read this if you have problems with emails

Posted: 31 Aug 2015, 13:19
by rohit.ascent
Hi ,
I have been implemented all shown method including the testmail.php.
here testmail.php when it running in the brower is loading and showing blank page but not sending any mails.
Even i had made changes in the xampp/php/php.ini and xampp/sendmail/sendmail.ini as shown in the xampp tutorial.
please help me out of this issue
Mantis is a extraordinary tool to report bugs , so i want stay with this and struggle untill it resolves the auto email setup
Please any one suggest some ideas to resolve this,,,,....


Thank you

Re: Please read this if you have problems with emails

Posted: 03 Sep 2015, 06:53
by rohit.ascent
Hi All,
Please follow this steps those who are using mantis with the help of xampp
At C:\xampp\php\php.ini they must edit this fields
SMTP = smtp.gmail.com
smtp_port = 465

; For Win32 only.
; http://php.net/sendmail-from
;sendmail_from = postmaster@localhost

; XAMPP IMPORTANT NOTE (1): If XAMPP is installed in a base directory with spaces (e.g. c:\program filesC:\xampp) fakemail and mailtodisk do not work correctly.
; XAMPP IMPORTANT NOTE (2): In this case please copy the sendmail or mailtodisk folder in your root folder (e.g. C:\sendmail) and use this for sendmail_path.
; XAMPP: Comment out this if you want to work with fakemail for forwarding to your mailbox (sendmail.exe in the sendmail folder) "\ -t"
sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"

; XAMPP: Comment out this if you want to work with mailToDisk, It writes all mails in the C:\xampp\mailoutput folder
;sendmail_path="C:\xampp\mailtodisk\mailtodisk.exe"

; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =
And save it then move to
Send mail xampp\sendmail\sendmail.ini and edit this field


; if your smtp server requires authentication, modify the following two lines

auth_username=xxxxxx@gmail.com
auth_password=xxxxx



; force the sender to always be the following email address
; this will only affect the "MAIL FROM" command, it won't modify
; the "From: " header of the message content

force_sender=xxxxxx@gmail.com


Follow this and above steps for config_inc.php as posted by the atrol(admin) .
This steps resolved auto email notification issue for me, its working for me if any doubts you contact to my mail id : rohit.kunchala@gmail.com
Hope this post helps to all those who are facing issue using xampp in mantis
Thank you

Re: Please read this if you have problems with emails

Posted: 16 Sep 2015, 10:58
by massi
Hi all,

I have some issues with my mantis, the main issue is the sending mail

I tried the the solution listed in the begining of this post and the script testmail.php works.

My version mantis is 1.2.8 and my config_inc.php :

Code: Select all

	$g_hostname = 'xxxx.bdb';
	$g_db_type = 'mysql';
	$g_database_name = 'xxx';
	$g_db_username = 'xxx';
	$g_db_password = 'xxx';
	$g_allow_signup    = ON;  //allows the users to sign up for a new account
	$g_phpMailer_method = PHPMAILER_METHOD_SMTP;
	$g_smtp_host =  'smtp.mydomain.com';
	$g_smtp_connection_mode = 'ssl';
	$g_smtp_port = 465;
    $g_smtp_username = 'xxxx@mydomain.com';
    $g_smtp_password = 'xxxx';
	$g_enable_email_notification = ON;
	$g_send_reset_password = ON;
	$g_administrator_email = 'xxxx@mydomain.com';
	$g_webmaster_email = 'xxxx@mydomain.com';
	$g_from_email = 'xxxx@mydomain.com';
	$g_return_path_email = 'xxxx@mydomain.com';
    $g_email_send_using_cronjob = OFF;	
	$g_from_name = 'Mantis Bug Tracker';
	$g_debug_email = ON;
	$g_log_level = LOG_EMAIL | LOG_EMAIL_RECIPIENT;
    $g_log_destination = 'file: mantisbt.log'; 
	


Thank you

Re: Please read this if you have problems with emails

Posted: 24 Sep 2015, 08:51
by krishchandru
Hi

I have been trying with a WAMP server and gmail smtp. Looks like there is something at gmail's end that is preventing the login. I got an email from gmail that "an unsecure application that is not meeting the modern security standards is tying to attempt logging in" - Google has prevented the login.
I got this message when i attempted a test mail from the send mail program under the admin folder.

Request the experts to throw some light.

The setting i have been using is as follows.

# --- Email Configuration ---
$g_phpMailer_method = PHPMAILER_METHOD_SENDMAIL; # or PHPMAILER_METHOD_SMTP, PHPMAILER_METHOD_SENDMAIL
$g_smtp_host = 'smtp.gmail.com'; # used with PHPMAILER_METHOD_SMTP
$g_smtp_username = 'i******s@gmail.com'; # used with PHPMAILER_METHOD_SMTP
$g_smtp_password = '*******'; # used with PHPMAILER_METHOD_SMTP
$g_administrator_email = 'i******s@gmail.com';
$g_webmaster_email = 'i******s@gmail.com';
$g_from_email = 'i******s@gmail.com'; # the "From: " field in emails
$g_return_path_email = 'i******s@gmail.com'; # the return address for bounced mail
$g_from_name = 'Mantis Bug Tracker';
$g_smtp_connection_mode = 'ssl';
$g_smtp_port = 465;
# $g_email_receive_own = OFF;
# $g_email_send_using_cronjob = OFF;

Re: Please read this if you have problems with emails

Posted: 05 Nov 2015, 15:47
by dharding
krishchandru wrote:Hi

I have been trying with a WAMP server and gmail smtp. Looks like there is something at gmail's end that is preventing the login. I got an email from gmail that "an unsecure application that is not meeting the modern security standards is tying to attempt logging in" - Google has prevented the login.
I got this message when i attempted a test mail from the send mail program under the admin folder.
I get the same result. The method in this thread now appears to be defunct.

Text of email:

Hi XXX,
Someone just tried to sign in to your Google Account YYYY@gmail.com from an app that doesn't meet modern security standards.

Details:

Thursday, November 5, 2015 9:55 AM (Eastern Standard Time)
United States*

We strongly recommend that you use a secure app, like Gmail, to access your account. All apps made by Google meet these security standards. Using a less secure app, on the other hand, could leave your account vulnerable. Learn more.

Google stopped this sign-in attempt, but you should review your recently used devices:

REVIEW YOUR DEVICES NOW
Best,
The Google Accounts team

Re: Please read this if you have problems with emails

Posted: 06 Nov 2015, 07:55
by rasim
Hai,

I am trying to use mantis, Email is not working if use smtp port? I am trying from the past 4 days, but still now i couldn't able to figure it out, please let me know the solution for this. Thanks in Advance.

Re: Please read this if you have problems with emails

Posted: 04 Feb 2016, 23:15
by vdweller
Hello,

I have a free hosting from awardspace. It says in the hosting options that SMTP is disabled. Does this mean I won't be able to make the email work properly, or is it irrelevant?

Re: Please read this if you have problems with emails

Posted: 21 Sep 2016, 21:35
by pwason
CentOS 6.8 w/ SELinux, Webmin, PostFix, Mantis-BT
Webmin can send a test email via PostFix with no issue.
Mantis-BT sends nothing.
Added SMTP stuff to config_inc.php. (Webmin/PostFix also using SMTP)
Set SELinux flag to allow httpd to send emails (it was off; don't know how Webmin was doing it)
Restarted everything.
Still no emails from Mantis-BT.
Boss getting cranky.

Re: Please read this if you have problems with emails

Posted: 22 Sep 2016, 09:09
by atrol
pwason wrote: Webmin can send a test email via PostFix
Did you try using mail or sendmail instead of SMTP?

Code: Select all

$g_phpMailer_method = PHPMAILER_METHOD_MAIL;
or

Code: Select all

$g_phpMailer_method = PHPMAILER_METHOD_SENDMAIL;

Re: Please read this if you have problems with emails

Posted: 09 Dec 2016, 15:39
by newbe
Hello,
although this topic seems to be an all time "favourite" I have a question to which I need some help for interpretation:
I'm using MantisBT 1.2.19 now for quite a long time (>2 years) in an Win7 environment ("xampp based") and everything worked as expected. In the field of email one and always the same problem arose till now in case a wrong email address was entered. After this the complete email communication stopped. However, this could be identified easily by checking the email queue, deleting the email with the faulty address and everything is fine again.
But 3 days ago the email system stopped again. In this case, the email queue showed no faulty address. In steps I deleted the oldest email and after that all mails in the queue - no change.
Then, I checked ../admin/test_email.php which showed there is a problem with email settings. Because I'm not aware of any changes, I enables logging of LOG_EMAIL and LOG_EMAIL_RECIPIENT, but nothing is recorded, when performing the test_email.php, so I have no hint where to deep dive.
Just for completeness: PHPMAILER_METHOD_SMTP, $g_smtp_connection_mode as defaulted.
Is there any way to track email problems (wrong port, wrong encryption mode or whatever else ?

Cheers and a nice weekend!
Uli

Re: Please read this if you have problems with emails

Posted: 13 Dec 2016, 10:05
by ryanperlman
still have some issues so where can i ask?

Re: Please read this if you have problems with emails

Posted: 08 Jan 2017, 08:08
by Yury Vinogradov
For MantisBT 2 follow the instructions in first post of this thread.
I had to add two parameters to config_inc.php (located in: <XAMPP>\htdocs\mantis\ or <WAMP>\www\mantis\ ) to use gmail smtp:

Code: Select all

$g_smtp_connection_mode = 'tls';
$g_smtp_port = 587;
so, the full email settings section is:

Code: Select all

# --- Email Configuration ---
$g_phpMailer_method		= PHPMAILER_METHOD_SMTP; # PHPMAILER_METHOD_MAIL; # or PHPMAILER_METHOD_SMTP, PHPMAILER_METHOD_SENDMAIL
$g_smtp_host			= 'smtp.gmail.com';			# used with PHPMAILER_METHOD_SMTP
$g_smtp_username		= '<mymail>@gmail.com';					# used with PHPMAILER_METHOD_SMTP
$g_smtp_connection_mode = 'tls'; 
$g_smtp_port = 587;
$g_smtp_password		= '<my Gmail password>';					# used with PHPMAILER_METHOD_SMTP
$g_webmaster_email      = ''<mymail>@gmail.com';
$g_from_email           = ''<mymail>@gmail.com';	# the "From: " field in emails
$g_return_path_email    = ''<mymail>@gmail.com';	# the return address for bounced mail
$g_from_name			= 'MantisBT';
# $g_email_receive_own	= OFF;
# $g_email_send_using_cronjob = OFF;

Re: Please read this if you have problems with emails

Posted: 20 Jul 2017, 13:01
by rome1011
I Ues MAntsiBT 2.5.1
Though setting up
It does not send mail.


testmail.php


Warning: require_once(Mail.php): failed to open stream: No such file or directory in C:\Apache24\htdocs\mantis\testmail.php on line 2

Fatal error: require_once(): Failed opening required 'Mail.php' (include_path='.;C:\php\pear') in C:\Apache24\htdocs\mantis\testmail.php on line 2


I checked testmail.Php, and the error was found.
Please let me know how to handle it.

Re: Please read this if you have problems with emails

Posted: 26 Oct 2017, 20:50
by NetUser.1
Hello,

I kindly assistance on the here-discussed as I've tried everything mentioned and still can't receive the confirmation email from mantis to neither my hotmail/gmail accounts. I urgently need this as I'm falling behind committed work deadlines !!!!!!!!!!!

THANK YOU