Answers.Body: <p>As Mark said this is a known regression and we are looking at an expedited release. However as i can feel even a release this coming US Wednesday may be a bit late. </p>
  
  <p>What i would advise you to do is to if you cannot wait make a patch to the file vendor/pear/net_smtp/Net/SMTP.php along the lines of <a href="https://github.com/civicrm/civicrm-core/pull/10622/files" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-core/pull/10622/files</a>. The relevant block of code will be around ~line 600 of that particular file. </p>
  
  <p>Otherwise wait until 4.7.22 comes out which will be very soon. In regards to why this may not affect all users, it only affects users if they need to authenticate to the SMTP server over TLS</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-10T23:29:48.327Z
Answers.Text: Thank you, Seamus Lee and jackrabbithanna. I actually just grabbed the SMTP.php file from 4.7.20 which I downloaded from SourceForge, placed it in the packages/Net/ directory and emails flow perfectly again. I'm shocked we're not seeing more folks flagging this (not sure how one can do anything without email receipts, etc., in CiviCRM ... perhaps folks are using Sendmail (ugh).
Answers.UserDisplayName: MtnPavlas
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-10T23:40:01.943Z
Answers.Text: Also, the patch you linked to ... which file am I supposed to patch with it? (Sorry if it's obvious.)
Answers.UserDisplayName: MtnPavlas
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-11T06:01:13.613Z
Answers.Text: you need to patch vendor/pear/net_smtp/Net/STMP.php and look around line 600 and you should see the file like $this->socket or $this->socketOptions and change that to $this->_socket and $this->_socketOptions and you should be right. The patch i linked to is modifying a patching process that happens as part of composer when the CiviCRM tarball is built.
Answers.UserDisplayName: Seamus Lee
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-11T16:57:02.790Z
Answers.Text: Beautiful - thanks a lot for the pointer. This solved the issue (I have now removed the SMTP.php file from the packages/Net/ directory after patching vendor/pear/net_smtp/SMTP.php)
Answers.UserDisplayName: MtnPavlas
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-11T18:23:37.070Z
Answers.Text: This issue is affecting WordPress as well. I made the suggested changes and it is working again.
Answers.UserDisplayName: Codedogs
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-13T14:34:52.063Z
Answers.Text: Just noting that as of today (14 July 2017) 4.7.22 has now been released
Answers.UserDisplayName: Seamus Lee
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-10T21:04:56.657Z
Answers.LastActivityDate: 2017-07-10T21:04:56.657Z
Answers.UserDisplayName: Seamus Lee
Body: <p>After upgrading CiviCRM to 4.7.21 (on Joomla 3.7.3), no emails get sent from CiviCRM (transactional or from CiviMailing). In <em>System Settings >> Outbound Email (SMTP/Sendmail)</em> when I click on "Save and Send Test Email" the page keeps reloading for about a minute, and then results in 500 error ("This page isn't working").</p>
  
  <p>This worked perfectly before the upgrade.</p>
  
  <p>Also, I no longer see file packages/Net/SMTP.php (I re-ran the CiviCRM install just in case) which used to send email via SMTP ... is this now handled by another file in another directory?
  Thank you so much for any pointers.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-07-10T17:09:06.527Z
Comments.Text: yeah that's a regression, look for a release real soon that fixes this
Comments.UserDisplayName: jackrabbithanna
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-07-10T18:32:27.493Z
Comments.Text: 4.7.21 with Drupal is hopefully unaffected by this? I haven't seen problems with mailing so far.
Comments.UserDisplayName: Andy Clark
Tags: <joomla><email><4.7><mailserver><4.7.21>
Title: Cannot send email from CiviCRM after upgrade to 4.7.21 (Joomla 3.7.3)
ThreadText: # Cannot send email from CiviCRM after upgrade to 4.7.21 (Joomla 3.7.3)
  
  (Asked by: username_0 on 2017-07-10)
  
  After upgrading CiviCRM to 4.7.21 (on Joomla 3.7.3), no emails get sent from CiviCRM (transactional or from CiviMailing). In *System Settings >> Outbound Email (SMTP/Sendmail)* when I click on "Save and Send Test Email" the page keeps reloading for about a minute, and then results in 500 error ("This page isn't working").
  
  This worked perfectly before the upgrade.
  
  Also, I no longer see file packages/Net/SMTP.php (I re-ran the CiviCRM install just in case) which used to send email via SMTP ... is this now handled by another file in another directory?
  Thank you so much for any pointers.
  
  **Tags:** joomla, email, 4.7, mailserver, 4.7.21
  
  > **Comments:**
  > **username_1**: yeah that's a regression, look for a release real soon that fixes this  
  > **username_2**: 4.7.21 with Drupal is hopefully unaffected by this? I haven't seen problems with mailing so far.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2017-07-10. Score: 1 | Accepted answer
  
  As Mark said this is a known regression and we are looking at an expedited release. However as i can feel even a release this coming US Wednesday may be a bit late.
  
  What i would advise you to do is to if you cannot wait make a patch to the file vendor/pear/net\_smtp/Net/SMTP.php along the lines of <https://github.com/civicrm/civicrm-core/pull/10622/files>. The relevant block of code will be around ~line 600 of that particular file.
  
  Otherwise wait until 4.7.22 comes out which will be very soon. In regards to why this may not affect all users, it only affects users if they need to authenticate to the SMTP server over TLS
  
  > **Comments:**
  > **username_0**: Thank you, username_3 and username_1. I actually just grabbed the SMTP.php file from 4.7.20 which I downloaded from SourceForge, placed it in the packages/Net/ directory and emails flow perfectly again. I'm shocked we're not seeing more folks flagging this (not sure how one can do anything without email receipts, etc., in CiviCRM ... perhaps folks are using Sendmail (ugh).  
  > **username_0**: Also, the patch you linked to ... which file am I supposed to patch with it? (Sorry if it's obvious.)  
  > **username_3**: you need to patch vendor/pear/net_smtp/Net/STMP.php and look around line 600 and you should see the file like $this->socket or $this->socketOptions and change that to $this->_socket and $this->_socketOptions and you should be right. The patch i linked to is modifying a patching process that happens as part of composer when the CiviCRM tarball is built.  
  > **username_0**: Beautiful - thanks a lot for the pointer. This solved the issue (I have now removed the SMTP.php file from the packages/Net/ directory after patching vendor/pear/net_smtp/SMTP.php)  
  > **username_4**: This issue is affecting WordPress as well. I made the suggested changes and it is working again.  
  > **username_3**: Just noting that as of today (14 July 2017) 4.7.22 has now been released  
  
  ---
  
  