Gmail as SMTP. How do you turn on Open SSL / TLS?

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Anti-Spam Guide

Gmail as SMTP. How do you turn on Open SSL / TLS?

Postby rogersmithiii » Fri Dec 21, 2007 6:35 pm

Your board's URL: Private.
Version of phpBB3: 3.0.0
Was this a fresh install or a(n) update/upgrade/conversion (please be specific)? Clean Install in IIS6.0
Was this an install through your host? No. We have access to the Server inhouse.
MODs you have installed:
When the problem started: Immediately.

Additionally, you may wish to provide the following (where applicable)
Template(s) used: ProSilver
Language(s) used:
Version of PHP used: 5.2.5
Database and version used MYSQL V5.0.45



I've been playing around, trying to get email validation of new users to work. For some reason, PHPBB isn't liking our normal company email server, NOR the Gmail system.

First off, I can access the gmail account that we set up via the web, as well as via a POP Client.

Second, I removed the comment from the OpenSSL.dll setting in php.ini in the Windows directory. PHPBB shows OpenSSL to be enabled.

OpenSSL support enabled
OpenSSL Version OpenSSL 0.9.8e 23 Feb 2007

I also configured the Gmail settings according to the info on this web site.

tls://smtp.gmail.com
Port 465
Plain Authentication
username@gmail.com and password.

The error that shows up is as follows:

E-mail error
» EMAIL/SMTP
/bbsforum/ucp.php

Could not connect to smtp host : 0 : Unable to find the socket transport "tls" - did you forget to enable it when you configured PHP?

<b>[phpBB Debug] PHP Notice</b>: in file <b>/includes/functions_messenger.php</b> on line <b>835</b>: <b>fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to tls://smtp.gmail.com:465 (Unable to find the socket transport &quot;tls&quot; - did you forget to enable it when you configured PHP?)</b><br />

We're running IIS6 under Windows 2003 Server, so how do we enable TLS? I read something about having to compile PHP in OpenSSL, but this seems to apply to Linux or Unix, and I have no clue how to do this, or install this in Windows.

Can someone please help?

Thanks
rogersmithiii
Registered User
 
Posts: 16
Joined: Thu Dec 20, 2007 11:54 pm

Re: Gmail as SMTP. How do you turn on Open SSL / TLS?

Postby rogersmithiii » Mon Dec 24, 2007 11:43 am

Thanks to narcussist, I found out how to make this happen. To save anyone else the aggravation of my search, I decided to post the technique for getting PHPBB to use Gmail's SMTP server for general email tasks (especially validating new users). If this is too basic, please excuse the post. I want to insure that even newbies could figure this out. BTW, I set up PHPBB using Windows 2003 Server and IIS 6. The technique will probably be a bit different if you're using Linux.

**************************************************************

1. Go to the Gmail site. Register for an account. Make sure you can send and receive emails to and from this xxxx@gmail.com address using the Gmail web interface. This will confirm that your Gmail email box is functioning properly, and can send and receive email to and from the outside world.

2. Using the menu at the top right edge of the main Gmail window (the one that shows up after you log in), click on Settings, and then Forwarding and POP / IMAP. Under POP Download, click either Enable POP for all Mail, or Enable POP for Mail that Arrives Now (which ever suits your purpose). Configure anything else that appeals to you too. Exit from the Gmail Settings Window after saving your selections (this is important).

3. Using GMail's instructions at

mail.google.com/support/bin/answer.py?hl=en&answer=12103

Configure the email client of your choice (the one installed on your computer - Outlook, Outlook Express, Eudora, Thunderbird, etc) to access your Gmail account using POP and SMTP services. Confirm that you can both send and receive mail using your email client. This will prove that Gmail is responding to POP and SMTP commands from outside pieces of software.


4. Install PHPBB with the database of your choice, and make sure that everything (except the email-related pieces) is working. Go into the Administration Control Panel in PHPBB, and navigate down to the Email Settings. Select Use SMTP for Email. For the SMTP Server Address, key in

ssl://smtp.gmail.com

Do NOT use the TLS entry seen in some other posts on this site. Unless you install TLS support in PHP (which I could never figure out how to do), this will cause the email features in PHPBB to fail.

5. Key in an SMTP Server Port of 465

6. Key in the Authentication Method for SMTP as Login

7. Key in the SMTP Username that you created in Gmail, making sure that you use the entire Gmail address in the window
.
Example: paris_hilton@gmail.com

8. Key in the SMTP Password that you used when you set up the Gmail account.

9. Hit Submit.

10. Go into the Windows directory on the IIS / PHP / PHPBB server, and edit the PHP.INI file that you placed there. Uncomment (by removing the ; from in front) the following command in the file.

extension=php_openssl.dll

Reboot the system.

11. Test the New User Validation System in PHPBB by registering a new user. To see if this worked, check the Gmail email box to see if there's a message. The From Address will be the Gmail Address that you set up at the beginning of this process.

12. If you don't find an email message, check any Spam systems that you have. You might have to Whitelist the email address so that you see the messages. If the message is nowhere to be found, go into the Administration Control Panel, and using the Tabs at the top of the screen, select Maintenance. On the left side, select Error Log, and see if there are any SMTP errors showing up. This might give you an idea of what's going wrong.


Again, I'd like to thank narcussist who responded with help when no one else was able to.

Merry Christmas and Happy Holidays.

Rog
rogersmithiii
Registered User
 
Posts: 16
Joined: Thu Dec 20, 2007 11:54 pm

Re: Gmail as SMTP. How do you turn on Open SSL / TLS?

Postby Cloakk » Mon Dec 31, 2007 12:04 am

Hi Guys,

I keep getting problems with this. I'm doing all the same things, but I keep getting this unrecognized command error. As much as I search, there's no answer. Any idea on this?

Here's my info:

Your board's URL: Private
Version of phpBB3: 3.0.RC7
Was this a fresh install? Clean Install RC5 updated to RC7. Running on Ubuntu Server.
Was this an install through your host? Nope, Inhouse server.
MODs you have installed: NONE
When the problem started: ALWAYS.

Additionally, you may wish to provide the following (where applicable)
Template(s) used: Vista
Language(s) used: English
Version of PHP used: PHP Version 5.2.1
Database and version used MySQL(i) 5.0.38-Ubuntu_0ubuntu1-log

Here's my error:
---------------------------------------------------------
E-mail error
» EMAIL/SMTP
/phpBB3/memberlist.php

Ran into problems sending e-mail at Line 1238. Response: 502 5.5.1 Unrecognized command g34sm13779113rob.13
.
Backtrace

Connecting to ssl://smtp.gmail.com:465
LINE: 856 <- 220 mx.google.com ESMTP g34sm13779113rob.13

# EHLO MYSERVER.ATMYPRIVATEDOMAIN.COM


LINE: 1109 <- 250-mx.google.com at your service, [1.22.333.77]

LINE: 1109 <- 250-SIZE 28311552

LINE: 1109 <- 250-8BITMIME

LINE: 1109 <- 250-AUTH LOGIN PLAIN

LINE: 1109 <- 250 ENHANCEDSTATUSCODES

# AUTH LOGIN
LINE: 1238 <- 502 5.5.1 Unrecognized command g34sm13779113rob.13
---------------------------------------------------------
Cloakk
Registered User
 
Posts: 1
Joined: Mon Dec 31, 2007 12:00 am

Re: Gmail as SMTP. How do you turn on Open SSL / TLS?

Postby dexteryuen » Sat Jan 12, 2008 6:09 am

Thanks for your help.

After I uncommented the "extension=php_openssl.dll" within the php.ini file and restart my apache server, I got the following error:

Unknown(); Unable to load dynamic library 'C:/Program Files/Apache Group/Apache2/php/extensions/php_openssl.dll'

I have checked the php_openssl.dll file is located in the correct directory, please help!

My apache server version is: apache_2.0.61-win32-x86-openssl-0.9.7m
and php version is: php-4.3.10-Win32
dexteryuen
Registered User
 
Posts: 7
Joined: Mon Nov 26, 2007 2:29 pm

Re: Gmail as SMTP. How do you turn on Open SSL / TLS?

Postby callmecheez » Wed Feb 13, 2008 9:02 am

Hi there,

I'm trying to follow these instructions but I don't think I have access to my server (i don't run it, I pay for it . )

Thanks! :)
callmecheez
Registered User
 
Posts: 15
Joined: Tue Feb 12, 2008 1:59 pm

Re: Gmail as SMTP. How do you turn on Open SSL / TLS?

Postby M3g4d37h » Thu Feb 21, 2008 8:50 am

worked for me -- altho i dont have root access, my host evidently had the right settings in php.ini .. thx for the effort. :)
M3g4d37h
Registered User
 
Posts: 14
Joined: Mon May 01, 2006 3:32 am
Location: San Jose, CA USA

Re: Gmail as SMTP. How do you turn on Open SSL / TLS?

Postby Silver Espada » Sat May 24, 2008 11:41 am

well I have all the settings correct, the openssl uncommented, and still nothing. I'm still not getting e-mail in my inbox.

Are there any other settings in the php.ini file I have to look for? My forum is chuckundercover.com

E-mail error
» EMAIL/SMTP
/cron.php

Could not connect to smtp host : 0 : Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?

<b>[phpBB Debug] PHP Notice</b>: in file <b>/includes/functions_messenger.php</b> on line <b>835</b>: <b>fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to ssl://smtp.gmail.com:465 (Unable to find the socket transport &quot;ssl&quot; - did you forget to enable it when you configured PHP?)</b><br />
Silver Espada
Registered User
 
Posts: 6
Joined: Mon Feb 11, 2008 7:50 am
Location: Ft. Lauderdale, Florida, USA

Re: Gmail as SMTP. How do you turn on Open SSL / TLS?

Postby mzafpk » Thu Jan 08, 2009 10:04 pm

I configured same as guided by rogersmithiii » Mon Dec 24, 2007 11:43 am

but i am not getting the email. The error i found on Error Log are as follows,

-----------------------------------------------------------------------------------------------------
E-mail error
» EMAIL/SMTP
/ucp.php

Could not connect to smtp host : 0 : The operation completed successfully.


<b>[phpBB Debug] PHP Notice</b>: in file <b>/includes/functions_messenger.php</b> on line <b>846</b>: <b>fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: no SSL support in this build</b><br />
<b>[phpBB Debug] PHP Notice</b>: in file <b>/includes/functions_messenger.php</b> on line <b>846</b>: <b>fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to smtp.gmail.com:465</b><br />
-----------------------------------------------------------------------------------------------------

I also tried following configuration,

Use SMTP server for e-mail: Yes
SMTP server address: tls://smtp.gmail.com
SMTP server port: 465
Authentication method for SMTP: PLAIN
SMTP username: myaddress@gmail.com
SMTP password: My Password

I have updated the forum version to latest 3.0.4.

But still found the same error. Please help ....
mzafpk
Registered User
 
Posts: 1
Joined: Thu Jan 08, 2009 9:49 pm

Re: Gmail as SMTP. How do you turn on Open SSL / TLS?

Postby wired076 » Thu Jan 08, 2009 11:43 pm

Cloakk wrote:Hi Guys,

I keep getting problems with this. I'm doing all the same things, but I keep getting this unrecognized command error. As much as I search, there's no answer. Any idea on this?

Here's my info:

Your board's URL: Private
Version of phpBB3: 3.0.RC7
Was this a fresh install? Clean Install RC5 updated to RC7. Running on Ubuntu Server.
Was this an install through your host? Nope, Inhouse server.
MODs you have installed: NONE
When the problem started: ALWAYS.

Additionally, you may wish to provide the following (where applicable)
Template(s) used: Vista
Language(s) used: English
Version of PHP used: PHP Version 5.2.1
Database and version used MySQL(i) 5.0.38-Ubuntu_0ubuntu1-log

Here's my error:
---------------------------------------------------------
E-mail error
» EMAIL/SMTP
/phpBB3/memberlist.php

Ran into problems sending e-mail at Line 1238. Response: 502 5.5.1 Unrecognized command g34sm13779113rob.13
.
Backtrace

Connecting to ssl://smtp.gmail.com:465
LINE: 856 <- 220 mx.google.com ESMTP g34sm13779113rob.13

# EHLO MYSERVER.ATMYPRIVATEDOMAIN.COM


LINE: 1109 <- 250-mx.google.com at your service, [1.22.333.77]

LINE: 1109 <- 250-SIZE 28311552

LINE: 1109 <- 250-8BITMIME

LINE: 1109 <- 250-AUTH LOGIN PLAIN

LINE: 1109 <- 250 ENHANCEDSTATUSCODES

# AUTH LOGIN
LINE: 1238 <- 502 5.5.1 Unrecognized command g34sm13779113rob.13
---------------------------------------------------------



3.0.0 RC7 is not officially supported any more. I would recommend you upgrade to phpBB 3.0.4 which is the latest release.

Can you show us the settings you used to setup your email in phpBB 3? Remember to omit any passwords.
I.T. Construct
Webhost / Webmaster
Please contact me via email/im for help at reasonable prices.
email: admin@itconstruct.com.au

wired076 - Visit http://www.itconstruct.com.au
wired076
Registered User
 
Posts: 1436
Joined: Mon May 21, 2007 10:19 am
Name: Addison McDermid

Re: Gmail as SMTP. How do you turn on Open SSL / TLS?

Postby ToonArmy » Fri Jan 09, 2009 12:17 am

wired076: please read the timestamps on the posts ;)
Chris SmithBlogGitHub
Image
In a foreign field he lay. Lonely soldier unknown grave. On his dying words he prays. Tell the world of Paschendale.
User avatar
ToonArmy
Former Team Member
 
Posts: 4607
Joined: Sat Mar 06, 2004 5:29 pm
Location: Worcestershire, UK
Name: Chris Smith

Re: Gmail as SMTP. How do you turn on Open SSL / TLS?

Postby friendishan » Tue Sep 08, 2009 10:16 am

i am getting this error
E-mail error
» EMAIL/SMTP
/forum/ucp.php

Could not connect to smtp host : 13 : Permission denied

<b>[phpBB Debug] PHP Notice</b>: in file <b>/includes/functions_messenger.php</b> on line <b>879</b>: <b>fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to ssl://smtp.gmail.com:465 (Permission denied)</b><br />
friendishan
Registered User
 
Posts: 39
Joined: Sun May 10, 2009 9:37 am

Re: Gmail as SMTP. How do you turn on Open SSL / TLS?

Postby friendishan » Tue Sep 08, 2009 10:28 am

plz help me quick..
or hotmail settings might help too.....
friendishan
Registered User
 
Posts: 39
Joined: Sun May 10, 2009 9:37 am

Re: Gmail as SMTP. How do you turn on Open SSL / TLS?

Postby Pit$Bull » Tue Sep 08, 2009 10:33 am

As per rule 4h, please do not bump your topic until at least 6 hours have passed since the last response. Since most of us answer questions in the order they were posted, frequent bumping will only push you further away from help.
Pit$Bull
Former Team Member
 
Posts: 23099
Joined: Sat Dec 02, 2006 4:08 pm
Name: Can't Remember

Re: Gmail as SMTP. How do you turn on Open SSL / TLS?

Postby ToonArmy » Tue Sep 08, 2009 6:04 pm

friendishan wrote:Could not connect to smtp host : 13 : Permission denied

Your host is prohibiting connecting to the gmail servers.
Chris SmithBlogGitHub
Image
In a foreign field he lay. Lonely soldier unknown grave. On his dying words he prays. Tell the world of Paschendale.
User avatar
ToonArmy
Former Team Member
 
Posts: 4607
Joined: Sat Mar 06, 2004 5:29 pm
Location: Worcestershire, UK
Name: Chris Smith

Re: Gmail as SMTP. How do you turn on Open SSL / TLS?

Postby Ezio369 » Sun Jan 31, 2010 10:03 pm

Thank you so much "rogersmithiii" that helped me out LOADS. :D :D
Ezio369
Registered User
 
Posts: 5
Joined: Sun Jan 31, 2010 6:20 pm


Return to 3.0.x Support Forum

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Oyabun1, servetech and 72 guests