Answers.Body: <p>I discovered this was because CiviCRM attempts to send the email from do-not-reply@ and the account used to send the email did not have the rights to send on behalf of that email address. You cure it by creating a shared mailbox called do-no-reply@ and give the outbound email account rights to send email from that mailbox.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-09-13T08:02:34.800Z
Answers.Text: The do-not-reply@domain.com is hard coded at: https://github.com/civicrm/civicrm-core/blob/master/CRM/Core/BAO/Domain.php#L339
Answers.UserDisplayName: Jaap Jansma - CiviCooP
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-05-21T18:25:56.347Z
Answers.LastActivityDate: 2021-05-21T18:25:56.347Z
Answers.UserDisplayName: Stephen Palmstrom
Body: <p>If a CiviCRM site is using MS Exchange to handle email, a user attempting to unsubscribe gets an error like:</p>
  <p><em>Mailing Error Failed to send data [SMTP: Invalid response code received from SMTP server while sending email. This is often caused by a misconfiguration in Outbound Email settings. Please verify the settings at Administer CiviCRM &gt;&gt; Global Settings &gt;&gt; Outbound Email (SMTP). (code: 554, response: 5.2.0 STOREDRV.Submission.Exception:SendAsDeniedException.MapiExceptionSendAsDenied; Failed to process message due to a permanent exception with message Cannot submit message. 0.35250:89230000,</em></p>
  
Tags: <email><unsubscribe>
Title: Unsubscribe confirmation email fails when using Exchange as the mail server
ThreadText: # Unsubscribe confirmation email fails when using Exchange as the mail server
  
  (Asked by: username_0 on 2021-05-21)
  
  If a CiviCRM site is using MS Exchange to handle email, a user attempting to unsubscribe gets an error like:
  
  *Mailing Error Failed to send data [SMTP: Invalid response code received from SMTP server while sending email. This is often caused by a misconfiguration in Outbound Email settings. Please verify the settings at Administer CiviCRM >> Global Settings >> Outbound Email (SMTP). (code: 554, response: 5.2.0 STOREDRV.Submission.Exception:SendAsDeniedException.MapiExceptionSendAsDenied; Failed to process message due to a permanent exception with message Cannot submit message. 0.35250:89230000,*
  
  **Tags:** email, unsubscribe
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2021-05-21. Score: 2
  
  I discovered this was because CiviCRM attempts to send the email from do-not-reply@ and the account used to send the email did not have the rights to send on behalf of that email address. You cure it by creating a shared mailbox called do-no-reply@ and give the outbound email account rights to send email from that mailbox.
  
  > **Comments:**
  > **username_1**: The do-not-reply@domain.com is hard coded at: https://github.com/civicrm/civicrm-core/blob/master/CRM/Core/BAO/Domain.php#L339  
  
  ---
  
  