Answers.Body: <p>It doesn't appear to be an authentication issue, it appears to be a network issue. Do you have a firewall on the server, or between the server and the Internet that could be blocking your outbound request to port 465?</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-18T21:10:01.203Z
Answers.Text: Our server hosting is a GoDaddy Linux server with cPanel, so unfortunately I'm not sure. I just tried setting up one of the free emails that came with the server so I could try out a different SMTP server besides Google App's, but I got the same error.
Answers.UserDisplayName: aschrack
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-19T02:07:53.783Z
Answers.Text: I think you should ask GoDaddy about any default firewall settings on the server, or other firewalls between your server and the public Internet.
Answers.UserDisplayName: Paul Dufresne
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-19T18:37:36.490Z
Answers.Text: Well I figured out a workaround. I set up a local email address through GoDaddy's cPanel and named it No Reply. The SMTP works through that and I set CiviCRM to show up as our Google Apps email. Thanks anyway, Paul!
Answers.UserDisplayName: aschrack
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-15T18:23:01.210Z
Answers.LastActivityDate: 2016-04-16T03:32:11.157Z
Answers.LastEditDate: 2016-04-16T03:32:11.157Z
Answers.UserDisplayName: Paul Dufresne
Body: <p>When I try to set up my SMTP through our Google Apps, I keep getting errors:</p>
  
  <blockquote>
    <p>Failed to connect to ssl://smtp.gmail.com:465 [SMTP: Failed to
    connect socket: Connection refused (code: -1, response: )]</p>
  </blockquote>
  
  <p>I have tried all the different ports and also a personal Gmail account. I've seen other questions and how Google puts a cap on email campaigns. We are planning on using our existing Mailchimp for mass emailing. This is also a new installation. Any ideas how to connect?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-11-29T10:49:03.190Z
Comments.Text: Gmail needs a certain combination of settings to work. Check [this answer](https://civicrm.stackexchange.com/a/45990/15929) for details that worked in 2023.
Comments.UserDisplayName: Torben Gundtofte-Bruun
Tags: <email><smtp>
Title: Outbound SMTP through Google Apps: Rejected Connection
ThreadText: # Outbound SMTP through Google Apps: Rejected Connection
  
  (Asked by: username_0 on 2016-04-15)
  
  When I try to set up my SMTP through our Google Apps, I keep getting errors:
  
  > Failed to connect to ssl://smtp.gmail.com:465 [SMTP: Failed to
  > connect socket: Connection refused (code: -1, response: )]
  
  I have tried all the different ports and also a personal Gmail account. I've seen other questions and how Google puts a cap on email campaigns. We are planning on using our existing Mailchimp for mass emailing. This is also a new installation. Any ideas how to connect?
  
  **Tags:** email, smtp
  
  > **Comments:**
  > **username_1**: Gmail needs a certain combination of settings to work. Check [this answer](https://civicrm.stackexchange.com/a/45990/15929) for details that worked in 2023.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2016-04-15. Score: 2
  
  It doesn't appear to be an authentication issue, it appears to be a network issue. Do you have a firewall on the server, or between the server and the Internet that could be blocking your outbound request to port 465?
  
  > **Comments:**
  > **username_0**: Our server hosting is a GoDaddy Linux server with cPanel, so unfortunately I'm not sure. I just tried setting up one of the free emails that came with the server so I could try out a different SMTP server besides Google App's, but I got the same error.  
  > **username_2**: I think you should ask GoDaddy about any default firewall settings on the server, or other firewalls between your server and the public Internet.  
  > **username_0**: Well I figured out a workaround. I set up a local email address through GoDaddy's cPanel and named it No Reply. The SMTP works through that and I set CiviCRM to show up as our Google Apps email. Thanks anyway, Paul!  
  
  ---
  
  