Mantis SSL with Gmail

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
eliasn
Posts: 8
Joined: 30 Jan 2008, 14:51
Location: Porto Alegre, Brazil
Contact:

Mantis SSL with Gmail

Post by eliasn »

Hello people!
I'm trying to make the Mantis send email for a connection ssl (at gmail).
I read the issue 8369 (http://www.mantisbt.org/bugs/view.php?id=8369), and tried the steps it.
My steps:
  • Alter the smtp parameter to 'ssl://smtp.gmail.com:465'
  • Alter the smtp parameter to 'smtp.gmail.com:465'
  • Replace the phpmailer for version 2
  • Insert the $g_smtp_connection_mode = 'ssl' parameter
The erros are:
SYSTEM WARNING: fsockopen() expects parameter 2 to be long, string given - when I'm using the phpmailer with Mantis installation

Fatal error: Cannot access private property PHPMailer::$smtp in C:\wamp\www\mantis-1.1.2\core\email_api.php on line 807 - when I'm using the phpmailer 2. Mantis send the email, bug stay in the blank screen with this error (with ssl://smtp.gmail.com:465)

Can someone help me?

Regards!!!
Elias Nogueira
Test engineer
http://sembugs.blogspot.com
Image
sigmapie
Posts: 6
Joined: 08 Oct 2008, 20:14

Re: Mantis SSL with Gmail

Post by sigmapie »

They fixed this in the 1.2.x stream, so the email_api.php file in that ticket will NOT work for 1.1.2.

If you would like to use it in 1.1.2 you must edit your email_api.php file. At line 781, add the following:
if ( ! is_blank( config_get( 'smtp_connection_mode' ) ) ) {
$mail->SMTPSecure = config_get( 'smtp_connection_mode' );
}

and it should work. I tried to upload email_api.php, but it would not let me attach anything to this post... I dunno.

So my steps are:
Alter the smtp parameter to 'smtp.gmail.com:465'
Replace the phpmailer for version 2, I downloaded v2.0.2 from here:
http://downloads.sourceforge.net/phpmai ... g_mirror=0
Insert the $g_smtp_connection_mode = 'ssl' parameter
Alter $g_smtp_username = 'whatevermygmailnameis@gmail.com'

That worked for me, I tested it.
jeremfg
Posts: 5
Joined: 19 Feb 2010, 19:17

Re: Mantis SSL with Gmail

Post by jeremfg »

I've been struggling with this issue for almost a month.... With the current production version : 1.1.8


This really sloved my problems... I can use a gmail account to send emails, since I couldn't with my ISP's servers...

They use the same thing as Windows Live (hotmail) as far as I can see from TELNET's response and my ISP marketing scheme (user@ISP.com can be viewed on hotmail.com, and some partnership between the two).

And i get the same error with my ISP server as by using smtp.live.com...

So there's still an issue with smtp.live.com and PHPMailer, but at least, it works now with smtp.gmail.com, so I don't mind much!
Post Reply