PDA

View Full Version : trying to use Gmail SMTP servers for vB emails, but it's not working


Fangs404
04-21-2009, 01:19 AM
I originally posted this in General, but it wasn't getting any attention, and I can't bump that thread, so I thought I'd put it in here where it probably should've been originally (oops).

I'd like to use Gmail's SMTP server to send all forum emails because we've been having some issues sending emails. A lot of free servers will accept them from our server (like Gmail and Yahoo!), but most school and business email addresses never get the email confirmation sent to them. I figure that using Gmail's SMTP server will fix this, but it's just not working. Here're the settings we're using:

SMTP server: smtp.gmail.com
port: 465
SMTP username: [username]@gmail.com
password: [password]
SMTP secure connection: TLS

When running the diagnostic, there's a delay of about 30 seconds, and then we get this error:

Pertinent SMTP Settings
SMTP: tls://smtp.gmail.com:465
SMTP Username: [username]@gmail.com

The mailing function returned an error while trying to send the mail.
The following errors were outputted by PHP when attempting to send mail:

Warning: 0 Unexpected response when connecting to SMTP server in [path]/includes/class_mail.php on line 601

Does anyone have any idea why this is happening?

puertoblack2003
04-21-2009, 02:45 AM
I originally posted this in General, but it wasn't getting any attention, and I can't bump that thread, so I thought I'd put it in here where it probably should've been originally (oops).

I'd like to use Gmail's SMTP server to send all forum emails because we've been having some issues sending emails. A lot of free servers will accept them from our server (like Gmail and Yahoo!), but most school and business email addresses never get the email confirmation sent to them. I figure that using Gmail's SMTP server will fix this, but it's just not working. Here're the settings we're using:

SMTP server: smtp.gmail.com
port: 465
SMTP username: [username]@gmail.com
password: [password]
SMTP secure connection: TLS

When running the diagnostic, there's a delay of about 30 seconds, and then we get this error:



Does anyone have any idea why this is happening?


change this SMTP secure connection: TLS

to ssl

Fangs404
04-21-2009, 03:27 AM
SSL requires a different port, though. According to http://mail.google.com/support/bin/answer.py?hl=en&answer=13287 I need to use port 995 for SSL. I tried that, and I get the same error.

Any idea?

Dismounted
04-21-2009, 09:18 AM
Can you check the mail logs on the server?

puertoblack2003
04-21-2009, 11:14 AM
SSL requires a different port, though. According to http://mail.google.com/support/bin/answer.py?hl=en&answer=13287 I need to use port 995 for SSL. I tried that, and I get the same error.

Any idea?


dont understand the error but i have the same setup and its working fine on my board.makes sure you comment out in php.in the openssl extension.

Angel-Wings
04-21-2009, 12:15 PM
SSL requires a different port, though. According to http://mail.google.com/support/bin/answer.py?hl=en&answer=13287 I need to use port 995 for SSL. I tried that, and I get the same error.

Any idea?

Hmmm - 995 is POP3 - dunno how you want to use SMTP on a POP3 port ;)

Maybe try a telnet on Gmail's 465 port sending it a HELO to see if SSL is offered or if they only offer TLS / Starttls

Fangs404
04-21-2009, 05:20 PM
Hmmm - 995 is POP3 - dunno how you want to use SMTP on a POP3 port ;)

Maybe try a telnet on Gmail's 465 port sending it a HELO to see if SSL is offered or if they only offer TLS / Starttls

HAHAHA! I can't believe I misread it like that. I just changed it to SSL with port 465, and it worked perfectly. Wow. Thanks for the help guys. It's working!

howcome
05-04-2009, 05:33 PM
im having same problem

Dismounted
05-05-2009, 05:41 AM
Did you read the responses?

howcome
07-10-2009, 05:20 AM
yes but either way it fails i dont get an email

ps2wiz
09-07-2009, 01:41 AM
I just changed it to SSL with port 465, and it worked perfectly.

I am having the same exact problem, but how do I change it to SSL from TLS?

ENF
09-10-2009, 12:51 AM
Just noticed this thread:

Not sure what exactly people have or have not done, but here is our settings that work for us.

1) PHP

Make sure OpenSSL is uncommented. (In other words, it's loading in PHP)

2) vBulletin Mail Settings (AdminCP → vBulletin Options → Email Options)

SMTP: Yes
SMTP Host: smtp.gmail.com
SMTP Port: 587 (Can be 465 or 587, one should work)
SMTP Username: youraccount@googledomain.com (Gmail or Google Apps account)
SMTP Password : youraccountpassword
SMTP Secure Connection: TLS

(This information from Google was used to set this up when we first started: http://mail.google.com/support/bin/answer.py?hl=en&answer=13287)

This setup has worked for us for a long-time without any hassles. We do have our mail hosted through the Google Apps system.

final kaoss
02-10-2010, 12:17 AM
K im using gmail as described here, should this be on or off? (in before the "what host are you using") I'm at x10hosting.com free plans.

Enable '-f' Parameter
Some sendmail servers may require the '-f' parameter to be sent with email calls from PHP. If you are having problems with users not receiving email, try enabling this option. In all likelihood, your problem will not be caused by this setting.

This setting does not work when PHP SAFE MODE is enabled.

I just recently changed my email settings as described in this thread, will the system still go crazy and try to say the mail is being sent from x10 this way?

I've noticed that what's doing it is.. everytime the mysql server goes down, vb sends me an email wanting to tell me about it, and for every person who visits, it spits out another email

--------------- Added 1265777996 at 1265777996 ---------------

OK, just ran a test and it sends all email fine EXCEPT these

Database error in vBulletin :

mysql_pconnect() [<a href='function.mysql-pconnect'>function.mysql-pconnect</a>]: #07000(proxy) all backends are down
/home/---------/public_html/forum/includes/class_core.php on line 311

MySQL Error :
Error Number :
Request Date : Tuesday, February 9th 2010 @ 11:45:13 PM
Error Date : Tuesday, February 9th 2010 @ 11:45:13 PM
Script : http://vgchat.info/forum/
Referrer : http://vgchat.info/******************
IP Address : *************
Username :
Classname : vB_Database
MySQL Version :

Is it sending this error message from a different account because the db is down? How to fix this?

Marco van Herwaarden
02-11-2010, 06:39 AM
mysql_pconnect() [<a href='function.mysql-pconnect'>function.mysql-pconnect</a>]: #07000(proxy) all backends are down
I must admit that i have never seen this error message before. What it does show me is that you are using pconnect. In most cases this should not be used and you hsould try to disable it in your config.php.

The error emails are sent from your technical email address as defined in your config.php. It does not matter if the database is online or not when sending these messages.

vbreal
03-02-2010, 03:05 PM
Just noticed this thread:

Not sure what exactly people have or have not done, but here is our settings that work for us.

1) PHP

Make sure OpenSSL is uncommented. (In other words, it's loading in PHP)

2) vBulletin Mail Settings (AdminCP → vBulletin Options → Email Options)

SMTP: Yes
SMTP Host: smtp.gmail.com
SMTP Port: 587 (Can be 465 or 587, one should work)
SMTP Username: youraccount@googledomain.com (Gmail or Google Apps account)
SMTP Password : youraccountpassword
SMTP Secure Connection: TLS

(This information from Google was used to set this up when we first started: http://mail.google.com/support/bin/answer.py?hl=en&answer=13287)

This setup has worked for us for a long-time without any hassles. We do have our mail hosted through the Google Apps system.

587 returned errors for me.

465 worked great

thanks for this thread peeps it helped a great deal.

egclive
03-24-2010, 02:22 PM
dont even bother with that just use google apps

jet rex
11-04-2010, 01:23 PM
come back to your Gmail account in browser -and pass test verification code (sms or phone)

mathias
11-18-2010, 05:31 AM
You think google will allow me to do this with over 400k users?

--------------- Added 1290122614 at 1290122614 ---------------

big problem gmail limits to 500 sends a day.

ehsanix
12-04-2010, 03:29 PM
:(

what this eror

Warning: fsockopen() [function.fsockopen]: unable to connect to tcp://smtp.gmail.com:465 (Connection timed out) in [path]/includes/class_mail.php on line 743

josantos
01-08-2011, 04:57 PM
:(

what this eror

Warning: fsockopen() [function.fsockopen]: unable to connect to tcp://smtp.gmail.com:465 (Connection timed out) in [path]/includes/class_mail.php on line 743

I have the same error but with another emailserver

snakes1100
01-08-2011, 09:08 PM
Do you have ssh access to your server, if you do, see if you can telnet to the smtp server

telnet smtp.gmail.com 465

GoHighVoltage
01-14-2011, 04:51 AM
Is it better to set up vbulletin to use gmail? I just have it using my server for email right now. What is best and why?

Divvy
08-13-2011, 04:39 PM
Just noticed this thread:

Not sure what exactly people have or have not done, but here is our settings that work for us.

1) PHP

Make sure OpenSSL is uncommented. (In other words, it's loading in PHP)

2) vBulletin Mail Settings (AdminCP → vBulletin Options → Email Options)

SMTP: Yes
SMTP Host: smtp.gmail.com
SMTP Port: 587 (Can be 465 or 587, one should work)
SMTP Username: youraccount@googledomain.com (Gmail or Google Apps account)
SMTP Password : youraccountpassword
SMTP Secure Connection: TLS

(This information from Google was used to set this up when we first started: http://mail.google.com/support/bin/answer.py?hl=en&answer=13287)

This setup has worked for us for a long-time without any hassles. We do have our mail hosted through the Google Apps system.

Thank you mate!!! Working fine now :)

Stripercoast2
09-02-2011, 01:20 AM
1) PHP

Make sure OpenSSL is uncommented. (In other words, it's loading in PHP)


Can someone please tell me how to do this step? I have everything else set as recommended, but I don't know how to do this step. Thank you in advance for your assisitance!
Jake

snakes1100
09-02-2011, 03:07 PM
Can someone please tell me how to do this step? I have everything else set as recommended, but I don't know how to do this step. Thank you in advance for your assisitance!
Jake

1st, view or post a link to your phpinfo file, it should show a block titled OpenSSL, if it doesnt, then OpenSSL isnt a compiled option in php on your server.