This took me a while to figure out yesterday, so in the hopes it helps someone else (or reminds me of the solution when I need to solve the same problem again).
The symptom: Mail.app on my Mac laptop is sending email with the wrong “From” header, even though I’ve chosen the right account to send it from, and the email in the Sent folder has the right email address in the From header.
The background: my major client company wants me to start using their email address for work I do for them, which seems completely reasonable to me. For various reasons, however, I need to keep using the Google SMTP server that I have for my Textuality email to send the mail (SSL certificate stuff that I have no control over being the main reason).
The solution: as far as the Google SMTP server is concerned, you need to prove you own the email address that’s in the From header, or it will simply substitute the email address that it does know that you own (in my case my textuality.com email address). To authenticate, and thereby allow the Google SMTP server to use the other email address as the sender email address, log in to the browser interface of your Google email account (whether GMail or a Google Apps account). Click on the “Settings” link (should be top right). Click on the “Accounts” link. In the “Send mail as:” section, click on the “Add another email address you own” link. The help information on this doesn’t make it clear that this secondary email address can be any email address, served through any system. It doesn’t have to be a Google account, it just has to be an address you receive email at. You won’t be picking up that email using the Google system unless you also set up something in the “Get mail from other accounts:” section, which is not something I wanted to do. Then, follow the instructions. Google will send email to your secondary address as a simple authentication (verification) procedure. Click on the link in the email, or follow the other instructions. Then hey presto, the Google SMTP server will allow you to send your email using your secondary email address as the “From” sender. And people replying to it will send the email to the right account.