Answers.Body: <p>It looks like you've discovered a bug!  I'm sorry this happened to you, but identifying this helps to make the software better.</p>
  
  <p>I confirmed this bug, and also confirmed that it's not limited to the <code>mail()</code> setting.  I've <a href="https://lab.civicrm.org/dev/core/issues/644" rel="nofollow noreferrer">opened an issue</a> on the CiviCRM issue tracker.</p>
  
  <p>UPDATE: I decided to dig into this a little bit to see if the fix was easy, and it wasn't too bad.  It's available for review now.  If you could apply <a href="https://github.com/civicrm/civicrm-core/pull/13407" rel="nofollow noreferrer">the fix</a> and let folks know on Github how it works for you, that would be great!  If you're not sure how to apply the fix, get in touch with me on <a href="https://chat.civicrm.org" rel="nofollow noreferrer">https://chat.civicrm.org</a>, my name there is @junglebird.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-06T13:53:19.033Z
Answers.Text: Thanks for your quick fix. I have succesfully applied the patches: the email adddresses are now what they are supposed to be.
Answers.UserDisplayName: Webmaster COVS
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-05T20:00:29.173Z
Answers.LastActivityDate: 2019-01-05T20:54:26.330Z
Answers.LastEditDate: 2019-01-05T20:54:26.330Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Body: <p>If I send a confirmation receipt (checked 'Send Confirmation and Receipt?' during renewal of a membership), the sender address is wrong if the preferred is chosen. In stead of displaying the address given, it scrambles the address to '<em>id of the address in civicrm_mail table</em>'@'<em>server host name</em>', e.g. 2@s2.domain.tld.</p>
  
  <p>When I choose another address, the sender address is fine.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-04T01:22:36.113Z
Comments.Text: Can you give more details so folks can help?  CiviCRM version and outgoing mail settings would be helpful here.
Comments.UserDisplayName: Jon G - Megaphone Tech
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-05T15:04:43.217Z
Comments.Text: Thanks, Jon.
  
  Version is 5.8.2. Components: CiviMember, CiviReport, CiviRules (not using CiviMail).
  
  Outgoing e-mail:
  
  'Allow Mail to be sent from logged in contact's email address' checked.
  Mail system: mail().
Comments.UserDisplayName: Webmaster COVS
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-05T15:33:33.503Z
Comments.Text: Tested it with 5.9.0. as well.
Comments.UserDisplayName: Webmaster COVS
Tags: <civimember><email><receipts>
Title: Confirmation receipt sent from strange sender address
ThreadText: # Confirmation receipt sent from strange sender address
  
  (Asked by: username_0 on 2019-01-03)
  
  If I send a confirmation receipt (checked 'Send Confirmation and Receipt?' during renewal of a membership), the sender address is wrong if the preferred is chosen. In stead of displaying the address given, it scrambles the address to '*id of the address in civicrm\_mail table*'@'*server host name*', e.g. 2@s2.domain.tld.
  
  When I choose another address, the sender address is fine.
  
  **Tags:** civimember, email, receipts
  
  > **Comments:**
  > **username_1**: Can you give more details so folks can help?  CiviCRM version and outgoing mail settings would be helpful here.  
  > **username_0**: Thanks, Jon.  Version is 5.8.2. Components: CiviMember, CiviReport, CiviRules (not using CiviMail).  Outgoing e-mail:  'Allow Mail to be sent from logged in contact's email address' checked. Mail system: mail().  
  > **username_0**: Tested it with 5.9.0. as well.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-01-05. Score: 2
  
  It looks like you've discovered a bug! I'm sorry this happened to you, but identifying this helps to make the software better.
  
  I confirmed this bug, and also confirmed that it's not limited to the `mail()` setting. I've [opened an issue](https://lab.civicrm.org/dev/core/issues/644) on the CiviCRM issue tracker.
  
  UPDATE: I decided to dig into this a little bit to see if the fix was easy, and it wasn't too bad. It's available for review now. If you could apply [the fix](https://github.com/civicrm/civicrm-core/pull/13407) and let folks know on Github how it works for you, that would be great! If you're not sure how to apply the fix, get in touch with me on <https://chat.civicrm.org>, my name there is @junglebird.
  
  > **Comments:**
  > **username_0**: Thanks for your quick fix. I have succesfully applied the patches: the email adddresses are now what they are supposed to be.  
  
  ---
  
  