Answers.Body: <p>Perhaps your internal mail server uses a different port for smtp? You can see that it's trying to connect to port 25, you might have it configured at a different port?</p>
  
  <p>Alternatively, if you have some kind of command line interface to the machine running the civicrm code, you could try a direct connection using, for example, telnet (details here <a href="https://www.port25.com/how-to-check-an-smtp-connection-with-a-manual-telnet-session-2/" rel="nofollow noreferrer">https://www.port25.com/how-to-check-an-smtp-connection-with-a-manual-telnet-session-2/</a>). </p>
  
  <p>And finally, you might also look at the dns on the civicrm code machine to make sure your domain for the smtp server is resolving like you expect, and/or trying putting in the ip of the mail server instead of its name.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-24T14:13:43.263Z
Answers.Text: Agreed on the last one!  "Resolves externally but not internally" suggests that you need to connect on the private IP, not the external one.  Your internal DNS server should return different results, or you can enable NAT Reflection on your router if it's an option.
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-24T23:17:33.413Z
Answers.Text:  to all the above. I also suggest checking your mail settings as shown in `phpinfo()`, and identify and watch the mail logs on the machine you're delivering from and to (if at all possible). Revealing what's actually happening with the email should clarify things quickly.
Answers.UserDisplayName: Chris Burgess
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-24T14:10:33.690Z
Answers.LastActivityDate: 2017-01-24T14:10:33.690Z
Answers.UserDisplayName: Alan Dixon
Body: <blockquote>
    <p>Failed to connect to smtp.tipping.org.au:25 [SMTP: Failed to connect
    socket: Connection timed out (code: -1, response: )].</p>
  </blockquote>
  
  <p>WE have an internal mail server. Can resolve externally. Requires username and password authentication.</p>
  
  <p>Tried most things we can think of to set up outbound email but get the above error message after sending test message</p>
  
  <p>Have tried using mail(), appears to send test message successfully, but never received.</p>
  
  <p>Grateful for advice on how we might correct outbound email settings.</p>
  
Tags: <email>
Title: outbound email settings failure to send test message
ThreadText: # outbound email settings failure to send test message
  
  (Asked by: username_0 on 2017-01-24)
  
  > Failed to connect to smtp.tipping.org.au:25 [SMTP: Failed to connect
  > socket: Connection timed out (code: -1, response: )].
  
  WE have an internal mail server. Can resolve externally. Requires username and password authentication.
  
  Tried most things we can think of to set up outbound email but get the above error message after sending test message
  
  Have tried using mail(), appears to send test message successfully, but never received.
  
  Grateful for advice on how we might correct outbound email settings.
  
  **Tags:** email
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-01-24. Score: 1
  
  Perhaps your internal mail server uses a different port for smtp? You can see that it's trying to connect to port 25, you might have it configured at a different port?
  
  Alternatively, if you have some kind of command line interface to the machine running the civicrm code, you could try a direct connection using, for example, telnet (details here <https://www.port25.com/how-to-check-an-smtp-connection-with-a-manual-telnet-session-2/>).
  
  And finally, you might also look at the dns on the civicrm code machine to make sure your domain for the smtp server is resolving like you expect, and/or trying putting in the ip of the mail server instead of its name.
  
  > **Comments:**
  > **username_2**: Agreed on the last one!  "Resolves externally but not internally" suggests that you need to connect on the private IP, not the external one.  Your internal DNS server should return different results, or you can enable NAT Reflection on your router if it's an option.  
  > **username_3**:  to all the above. I also suggest checking your mail settings as shown in `phpinfo()`, and identify and watch the mail logs on the machine you're delivering from and to (if at all possible). Revealing what's actually happening with the email should clarify things quickly.  
  
  ---
  
  