Answers.Body: <p>Which version of civi are you using? <a href="https://issues.civicrm.org/jira/browse/CRM-14814" rel="nofollow noreferrer">https://issues.civicrm.org/jira/browse/CRM-14814</a> it's fixed on a fairly recent version of civicrm only</p>
  
  <p>Another reason can be the confirguration of your network or your server: can you start a connection on port 587 to smtp.office365.com ?</p>
  
  <p>However, before you spend too much time on it, last time I checked:
  - smtp on office365 was limited in volume, ie find at low volume, but won't work for production
  - 365 doesn't handle "+" notation, so and email to bounce+something@yourdomain.org won't end up in your bounce mailbox. This is needed to handle bounces in civicrm</p>
  
  <p>so I would recommend you:
  if it's for testing purpose, use a gmail account
  if it's for production purpose, use an external provider to do the bulk mailing and integrate it with your civi, for instance sendgrid and this extension:
  <a href="https://civicrm.org/extensions/sendgrid-event-notification-processor" rel="nofollow noreferrer">https://civicrm.org/extensions/sendgrid-event-notification-processor</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-02T17:06:14.697Z
Answers.Text: CiviCRM 4.7.16+, i.e. a pull from the latest master branch.  I saw CRM-14814 that it was supposed to have been fixed, which is why I asked the question.  It is not a production environment and the failure occurs at the Save and Test stage of setting up outbound emails.  In other words, it is not even making the first connection.  I can make a connection on that port using a putty terminal. What am I doing wrong?I have also tested out and concur that VERP doesn't appear to be supported - adding a redirection rule doesn't catch the bounce+ email before it is rejected.
Answers.UserDisplayName: Stephen Palmstrom
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-01T14:50:44.110Z
Answers.LastActivityDate: 2017-03-01T14:50:44.110Z
Answers.UserDisplayName: Xavier
Body: <p>I am trying to use Office 365 Exchange as the mail transport for CiviCRM, but get this error.</p>
  
  <p>Failed to connect to ssl://smtp.office365.com:587 [SMTP: Failed to connect socket: fsockopen(): unable to connect to ssl://smtp.office365.com:587 (Unknown error) (code: -1, response: )]</p>
  
  <p>I have looked at <a href="https://civicrm.stackexchange.com/questions/377/how-do-i-configure-smtp-with-starttls">enter link description here</a>, and links therein which seemed to indicate that a STARTTLS issue was fixed.</p>
  
  <p>Office 365 Exchange has these instructions for SMTP connections: 
  <a href="https://support.office.com/en-gb/article/POP-and-IMAP-settings-for-Outlook-Office-365-for-business-7fc677eb-2491-4cbc-8153-8e7113525f6c?ui=en-US&amp;rs=en-GB&amp;ad=GB" rel="nofollow noreferrer">enter link description here</a></p>
  
  <p>I am running a development system under Windows so don't have a mail server on board, and in any case don't want to overcomplicate things - performance isn't an issue.</p>
  
  <p>Any suggestions?</p>
  
Tags: <civimail><core>
Title: What should the outbound SMTP configuration be for Office 365 Exchange?
ThreadText: # What should the outbound SMTP configuration be for Office 365 Exchange?
  
  (Asked by: username_0 on 2017-03-01)
  
  I am trying to use Office 365 Exchange as the mail transport for CiviCRM, but get this error.
  
  Failed to connect to ssl://smtp.office365.com:587 [SMTP: Failed to connect socket: fsockopen(): unable to connect to ssl://smtp.office365.com:587 (Unknown error) (code: -1, response: )]
  
  I have looked at [enter link description here](https://civicrm.stackexchange.com/questions/377/how-do-i-configure-smtp-with-starttls), and links therein which seemed to indicate that a STARTTLS issue was fixed.
  
  Office 365 Exchange has these instructions for SMTP connections:
  [enter link description here](https://support.office.com/en-gb/article/POP-and-IMAP-settings-for-Outlook-Office-365-for-business-7fc677eb-2491-4cbc-8153-8e7113525f6c?ui=en-US&rs=en-GB&ad=GB)
  
  I am running a development system under Windows so don't have a mail server on board, and in any case don't want to overcomplicate things - performance isn't an issue.
  
  Any suggestions?
  
  **Tags:** civimail, core
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-03-01. Score: 1
  
  Which version of civi are you using? <https://issues.civicrm.org/jira/browse/CRM-14814> it's fixed on a fairly recent version of civicrm only
  
  Another reason can be the confirguration of your network or your server: can you start a connection on port 587 to smtp.office365.com ?
  
  However, before you spend too much time on it, last time I checked:
  - smtp on office365 was limited in volume, ie find at low volume, but won't work for production
  - 365 doesn't handle "+" notation, so and email to bounce+something@yourdomain.org won't end up in your bounce mailbox. This is needed to handle bounces in civicrm
  
  so I would recommend you:
  if it's for testing purpose, use a gmail account
  if it's for production purpose, use an external provider to do the bulk mailing and integrate it with your civi, for instance sendgrid and this extension:
  <https://civicrm.org/extensions/sendgrid-event-notification-processor>
  
  > **Comments:**
  > **username_0**: CiviCRM 4.7.16+, i.e. a pull from the latest master branch.  I saw CRM-14814 that it was supposed to have been fixed, which is why I asked the question.  It is not a production environment and the failure occurs at the Save and Test stage of setting up outbound emails.  In other words, it is not even making the first connection.  I can make a connection on that port using a putty terminal. What am I doing wrong?I have also tested out and concur that VERP doesn't appear to be supported - adding a redirection rule doesn't catch the bounce+ email before it is rejected.  
  
  ---
  
  