Macos – change the “From” name and address without going into Mail.app’s preferences

aliasapple-mailmacos

Can I somehow add an editable "From" field to Mail.app, a bit like Virtual Identity for Thunderbird, just like I could change the "Reply To" address on the fly?

In Mail.app, one can set up multiple email addresses for a single account by just entering a comma-seperated list like arjan@example.com, arjan+superuser@example.com. Next, when composing a message, Mail offers a dropdown to select a "From" address. And when replying, it automatically selects the right address if it can find a match:

enter image description here

enter image description here

Nice, but I'd like to be able to change the "From" on the fly, without going into the Account Information.

Also, in previous versions of Mail one could even specify multiple Full Names for a single account:

Email Address: Arjan <arjan@example.com>, Arjan on SU <arjan+superuser@example.com>

But nowadays, Mail only uses the setting of Full Name, and even ignores names in the Email Address field when no value for Full Name is set at all. Hence, it would be great if I could change the Full Name on the fly as well.

I had no luck finding a plugin for Mail yet.

When using sub-addressing aka address tags, anything that is sent to me+whatever@example.com is simply delivered to me@example.com. I'd then like to reply with the same full address, rather than just me@example.com if Mail cannot find a match, without going into the Account Information first. I sometimes also want to compose a new message with a new sub-addressing-address.

Best Answer

It is possible to have separate identities like this. If using Lion's Mail.app, open ~/Library/Mail/V2/MailData/Accounts.plist in a property list editor (I used Xcode's built-in one). Be sure to close Mail first and make a backup of the plist file.

Under MailAccounts there are a few Item dictionaries, from 0 to 2 in my case. Expand the one that contains the EmailAddresses key (Item 2 for me).

You need to create a new key called EmailAliases as a sibling of EmailAddresses (i.e. at the same level on the plist tree), if it doesn't already exist. (It probably won't since Mail.app doesn't have an interface to create these aliases AFAIK.) Make it a type Array.

For each "Some Name" <some@address.com> pair you want to use, you need to repeat the following three steps:

  1. Create a new Dictionary item inside the EmailAliases array.
  2. Create a key called name inside the dictionary, with a type of String, and set its value to the name you wish to use, e.g. Some Name.
  3. Create a key called alias inside the dictionary, with a type of String, and set its value to the address you want to pair with the full name you just entered, e.g. some@address.com

Be careful to put all the items in the correct tree levels. The name and alias keys are siblings, the key names have to be lowercase, and their values must not have quotes around them.

Save the plist when you're done and restart Mail. The "From" dropdown in the new message window should now contain the name/address alias pairs you just created. If they don't, recheck the structure. I've confirmed this method to work in Mail.app for OS X 10.7.1.

(Just to be explicit: you don't need to edit the EmailAddresses array or the FullUserName key at all when using the above method.)

Related Question