title: Best way to send email from my web app so it looks like it came from my users account
body: <p>I'm working on a web application. A user will create an email message that will be sent to another person.</p>
  
  <p>I would like the e-mail that gets sent to appear from the user's name and e-mail address of the user on my system. And if they reply to the e-mail then it should go directly to the sender's email address.</p>
  
  <p>However I am worried about the email message looking like spam to email filters along the way.</p>
  
  <p>Is there a proper way to do this?</p>
  
  <p>I noticed on a "contact" page on a WordPress blog that something very similar is done. The e-mail headers look like:</p>
  
  <pre><code>To: email@domain.com
  Subject: [Test Blog] =?UTF-8?B?aGVsbA==?=
  MIME-Version: 1.0
  Content-Type: text/plain; charset="utf-8"
  From:=?UTF-8?B?aGVsbA==?=&lt;sender@senderdomain.com&gt;
  Message-Id: &lt;20090207234737.39C9522802F3@web7.sat.wordpress.com&gt;
  Date: Sat,  7 Feb 2009 23:47:37 +0000 (UTC)
  Return-Path: donotreply@wordpress.com
  </code></pre>
  
  <p>What is interesting is that the display name in the "from" tag and the name that shows up in the subject line is encoded. I do not know if this helps with the spam filters or not, but thought it was at least worth mentioning.</p>
  
  <p>Also, who would receive an undeliverable notification in this example? Would it go to sender@senderdomain.com or would it go to donotreply@wordpress.com?</p>