I have problems sending emails from my production server with Symfony 2 , SwiftMailer and Gmail. When I send it from my localhost server no problem but when I test in the production server (Godaddy hosting) I get this error:
Connection could not be established with host smtp.gmail.com [Connection refused #111] 500 Internal Server Error - Swift_TransportException
I googled and tried many solutions without success. In localhost server it works with any simple configuration. This is my config.yml
swiftmailer:
transport: gmail
encryption: ssl
auth_mode: login
host: smtp.gmail.com
port: 587
username: myuser
password: mypassword
I put all the options for test but with email transport, username and password it works in localhost. I appreciated it any help in advance.
GoDaddy blocks all outgoing SMTP connections on their hosting. You will have to use their SMTP relay servers instead, or get a better host.
http://help.godaddy.com/article/955
http://www.satollo.net/godaddy-using-smtp-external-server-on-shared-hosting
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.