title: Avoid Gmail's "This message may not have been sent by" using sender header
body: <p>I'm creating an email a friend type system where I need our mail server to send emails from the user of the site to their friend, i.e. from fred@gmail.com, to tony@gmail.com.</p>
  
  <p>If, as is the case in this example, the user's are both part of Gmail the friend would receive an email with the warning "This message may not have been sent by: fred@gmail.com.</p>
  
  <p>I thought that by then adding a 'sender' header with our email (e.g. us@company.com) this should indicate to Gmail that we are the sender and are effectively openly spoofing the sender at their request. Is this true, can you get around Gmail's warning using the 'sender' header?</p>
  
  <p>I realise this is similar to the following question but I'm more interested in whether the sender header <em>should</em> have an effect: <a href="https://stackoverflow.com/questions/10378814/email-sent-from-web-server-causes-gmail-to-treat-as-phishing-how-to-get-rid-of">Email sent from web server causes gmail to treat as phishing. How to get rid of this?</a></p>
  
  <p>More info:
  I'm using netmailbot to send emails from our mail server using the '-customheader' parameter with 'sender' and 'x-sender' e.g. '-customheader sender:us@company.com x-sender:us@company.com'</p>