Trying to set up this module to work with gmail.

I've installed and configured Gmail correctly but can't send mail. I tried both the latest beta release and dev snapshot and nothing is working. This is whas was logged in debug mode:

SMTP -> ERROR: Failed to connect to server: Connection refused (111)
SMTP Error: Could not connect to SMTP host.

CommentFileSizeAuthor
#3 ScreenShot014.jpg58.91 KBHS
Members fund testing for the Drupal project. Drupal Association Learn more

Comments

HS’s picture

Do I need to configure phpmailer for Gmail? Is there any other instructions outside of the install.txt that I am missing?

tscadfx’s picture

Post all of your settings in order to review that they are correct. Leave out personal information (i.e. real email address and password).

HS’s picture

FileSize
58.91 KB

Hi,

See the attached screenshot.

I see this now: SMTP -> ERROR: Failed to connect to server: Connection refused (111) SMTP -> ERROR: Failed to connect to server: php_network_getaddresses: getaddrinfo failed: Name or service not known (0)

And the following in my logs:

fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to smtp.gmail.com:587 (Connection refused) in /homepages/..../sites/all/modules/smtp/phpmailer/class.smtp.php  on line 122.

fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to ssl://smtp.gmail.com:465 (Connection refused) in /homepages/..../sites/all/modules/smtp/phpmailer/class.smtp.php  on line 122.

Error sending e-mail from johnsmith@mydomain.com to someone@example.com : SMTP Error: Could not connect to SMTP host.

SMTP -> ERROR: Failed to connect to server: Connection refused (111) SMTP -> ERROR: Failed to connect to server: php_network_getaddresses: getaddrinfo failed: Name or service not known (0)

HS’s picture

BTW, the screenshot includes the settings you asked for and I have changed the email addresses and other sensitive information that were generated by the error messages and also included in the screenshot.

keithm’s picture

Try port 587 with TLS encryption protocol.

ThirstySix’s picture

SMTP -> ERROR: Failed to connect to server: Connection refused (111)
SMTP Error: Could not connect to SMTP host.

I change the port 587 with TLS encryption protocol, but repeat the same error.

HS’s picture

Keith in my response above I have pointed out that I have indeed used port 587.

HS’s picture

Sorry.. duplicate..

HS’s picture

I've tried all combinations. Nothing works. Been more than a month now since I posted this but couldn't get any help with this from the developers so I've discarded the module.

Here is another alternative folks: http://drupal.org/project/phpmailer

keithm’s picture

+1 on phpmailer. I converted all my sites to it a couple of months ago. Works flawlessly on gmail.

geeksforpc’s picture

Perhaps your hosting account system wants you to use email of your domain like abc@yourdomain.com which is already setup one their email system. Try to use the follow setup. It worked for me. Your SMTP server should be relay based instead of normal smtp server like smtpout.secureserver.net:

SMTP Server: relay-hosting.secureserver.net
SMTP User: abc@yourdomain.com
SMTP Passwork: leave blank
SMTP Port: 25
SMTP Authentication: No
SMTP Encryption: None

Good luck

franz’s picture

Status: Active » Closed (duplicate)

There are thousands of issues related to this already, if none of the solutions are work, please reopen.

Oliver Huynh’s picture

#11 works for users that hosts sites in GoDaddy

billyroebuck’s picture

I ran into the same problem with a Drupal 6 site, where the client uses Godaddy for hosting and Gmail for their email.

After spending a lot longer than I'd like to admit on this, I tried point #11 but it didn't work until I left the SMTP user as blank.

Under SMTP Auth Support settings:

SMTP server: relay-hosting.secureserver.net
SMTP port: 25
Use encrypted protocol: no

SMTP auth (make sure you set BOTH to blank)
--email: blank
--password: blank

Email from: {your@email.com}

I hope this helps!

IreOke’s picture

You are my personal live saver, I was like 3 days looking for that anwers...

gjpino83’s picture

you are the best!!!, I´ve been working on this for weeks!, thank youuuuu!!!!

bottle’s picture

This saved me too!! Thanks a lot!

MerrySea’s picture

Just to confirm, this was the resolution to fix the SMTP problem on GoDaddy. It only took 3 days to find this solution.

charlie charles’s picture

Issue summary: View changes

Using

Digital Ocean Hosting
Ubuntu
LAMP

I fixed it by uninstall smtp module
Then only use PHP http://drupal.org/project/phpmailer

skrtvm’s picture

thanks geeksforpc..

It works for me too.

Great... I have fed up by this problem for last 2 days...

thank you https://www.drupal.org/user/976928

CProfessionals’s picture

I have a lot of apologizing to Godaddy.... #14 worked (thanks billyroebuck). Actually godaddy was my backup I seem to have the same issue authenticating to an exchange server as well. Any idea why proper authentication does not work?