I have tried all of the suggestions found in the issue queue for this module, and yet I am unable to get it to connect to the Google Apps SMTP Server.
Here are my settings:
SMTP Server: smtp.gmail.com
Port: 587 or 465 (tried both)
Encryption: SSL and TLS (tried both with both ports)
Username:
myname@mydomain.com
Password: mypassword
Email from address: myname@mydomain.com
Email From Name: myreadablename
Send Test email to:
anotheraccount@mydomain.com
With these settings I receive the following error:
Error sending e-mail from myname@mydomain.com to anotheraccount@mydomain.com : SMTP Error: Could not connect to SMTP host.
Any help would be truly appreciated.
Comments
Comment #1
kd8fre commentedI should add that I am now finding that I am getting a (110) timeout error when it tries to connect.
Comment #2
Maung Maung commentedThe problem is at myname@mydomain.com.
If you want to use Gmail as SMTP server, change myname@mydomain.com to youremail@gmail.com and password must be youremail@gmail.com password.
If you are using Gmail with Google Apps under your domain,
you can use youremail@yourGoogleAppsDomainName.com and password.
Hopefully this will help your problem.
Comment #3
kd8fre commentedI should have been more specific, I am using Google Apps for my domain. I am using my "youremail@yourGoogleAppsDomainName.com" and still having this issue. I use a custom script on another, non-drupal site to send from the same email address and it works fine.
Comment #4
Maung Maung commentedHi, you can check the error log by checking the Enable Debugging check box above the Save Configuration button. So that you can get the cause of error in some way.
Comment #5
kd8fre commentedI have done that, here are the results from the log:
Error sending e-mail from myname@mydomain.com to anotheraccount@mydomain.com : SMTP Error: Could not connect to SMTP host.
This is the result from the on-screen print out from debugging:
SMTP -> ERROR: Failed to connect to server: Connection timed out (110)
SMTP Error: Could not connect to SMTP host.
Comment #6
kd8fre commentedI now know that the issue is the firewall on my server.
What do I need to do to change the firewall to make this work? I am on a CentOS shared server with root command line access.
Comment #7
kd8fre commentedClosing this, it is a firewall issue resolved by running the following commands:
iptables -I OUTPUT -p tcp --dport 465 -j ACCEPT
iptables -I OUTPUT -p tcp --dport 587 -j ACCEPT
Comment #8
bottle commentedI have the same issue, my host says he doesn't see any problem with firewall. what else can I do?
Where do I have to put the above mentioned commands?
iptables -I OUTPUT -p tcp --dport 465 -j ACCEPT
iptables -I OUTPUT -p tcp --dport 587 -j ACCEPT
thanks
Comment #9
poonam11210 commentedI am facing the same issue and while debugging i get error as
"SMTP -> ERROR: Failed to connect to server: Permission denied (13)
SMTP Error: Could not connect to SMTP host."
What do i do? Is this firewall issue from hosting site or what? I am also using CentOS server.