From: eileen Date: Sat, 25 May 2019 06:34:10 +0000 (+1200) Subject: dev/core#879 SMTP help text is misleading - references the wrong admin screen X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=177bc88905980ad76537492d15322750e4b54af9;p=civicrm-core.git dev/core#879 SMTP help text is misleading - references the wrong admin screen --- diff --git a/CRM/Admin/Form/Setting/Smtp.php b/CRM/Admin/Form/Setting/Smtp.php index e70260e63f..fea23ddd2b 100644 --- a/CRM/Admin/Form/Setting/Smtp.php +++ b/CRM/Admin/Form/Setting/Smtp.php @@ -72,6 +72,8 @@ class CRM_Admin_Form_Setting_Smtp extends CRM_Admin_Form_Setting { /** * Process the form submission. + * + * @throws \Exception */ public function postProcess() { // flush caches so we reload details for future requests @@ -95,16 +97,15 @@ class CRM_Admin_Form_Setting_Smtp extends CRM_Admin_Form_Setting { else { $session = CRM_Core_Session::singleton(); $userID = $session->get('userID'); - list($toDisplayName, $toEmail, $toDoNotEmail) = CRM_Contact_BAO_Contact::getContactDetails($userID); + list($toDisplayName, $toEmail) = CRM_Contact_BAO_Contact::getContactDetails($userID); //get the default domain email address.CRM-4250 list($domainEmailName, $domainEmailAddress) = CRM_Core_BAO_Domain::getNameAndEmail(); if (!$domainEmailAddress || $domainEmailAddress == 'info@EXAMPLE.ORG') { $fixUrl = CRM_Utils_System::url("civicrm/admin/domain", 'action=update&reset=1'); - CRM_Core_Error::fatal(ts('The site administrator needs to enter a valid \'FROM Email Address\' in Administer CiviCRM » Communications » FROM Email Addresses. The email address used may need to be a valid mail account with your email service provider.', [1 => $fixUrl])); + CRM_Core_Error::statusBounce(ts('The site administrator needs to enter a valid email address in Administer CiviCRM » Communications » Organization Address and Contact Info. The email address used may need to be a valid mail account with your email service provider.', [1 => $fixUrl])); } - if (!$toEmail) { CRM_Core_Error::statusBounce(ts('Cannot send a test email because your user record does not have a valid email address.')); } @@ -205,7 +206,7 @@ class CRM_Admin_Form_Setting_Smtp extends CRM_Admin_Form_Setting { * @param array $fields * Posted values of the form. * - * @return array + * @return array|bool * list of errors to be posted back to the form */ public static function formRule($fields) {