tyler hoffman

my technological discoveries

Identites in Mountain Lion's Mail.app

Identities, or E-mails aliases, allow someone to send emails through one SMTP server while using multiple E-mails addresses. This option is present in most of todays E-mails clients, except Apple’s Mail.app 5.0 option is hidden. There is a way to set up identities, but it will require a little bit of plist editing. I will give an example setup to make it easier to follow.

First Steps

Before we do anything, let’s backup the file we will be editing.

1
cp ~/Library/Mail/V2/MailData/Accounts.plist ~/Library/Mail/V2/MailData/Accounts_backup.plist

Listed below is a primary email and two extra ones.

Primary Gmail:   [email protected]
1st extra email: [email protected]
2nd extra email: [email protected]

I would like to be able to send E-mailss using the last two addresses but only use the SMTP servers fo the primary Gmail account. To make this possible, please look below and make sure your mail “Accounts” page looks similar to the one below. Note that this is basically the default setup for a single Gmail account on Mail.app.

The next step requires some plist editing. You are going to need to edit the file ~/Library/Mail/V2/MailData/Accounts.plist. You can open it in Xcode if you have it or in a text editor. I will demonstrate both ways.

Xcode

Notice the default E-mails that was set up in Mail is listed as the “Email Address”. Each alias has its own E-mails and name. Separate names are useful if you want to give your full name on some adresses and only your first on others.

Text Editor

Follow the format below for each new alias.

1
2
3
4
5
6
<dict>
  <key>alias</key>
  <string>[email protected]</string>
  <key>name</key>
  <string>Tyler</string>
</dict>

Below is just a section of the Accounts.plist file, but it is enough for you to know where to place the edits.

/Library/Mail/V2/MailData/Accounts.plist
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<key>DaysBetweenSyncs</key>
<integer>1</integer>
<key>DraftsMailboxName</key>
<string>Drafts</string>
<key>EmailAddresses</key>
<array>
  <string>[email protected]</string>
</array>

<!-- Below is the edited part -->

<key>EmailAliases</key>
<array>
  <dict>
      <key>alias</key>
      <string>[email protected]</string>
      <key>name</key>
      <string>Tyler</string>
  </dict>
  <dict>
      <key>alias</key>
      <string>[email protected]</string>
      <key>name</key>
      <string>Tyler S</string>
  </dict>
  <dict>
      <key>alias</key>
      <string>[email protected]</string>
      <key>name</key>
      <string>Tyler Smith</string>
  </dict>
</array>

<!-- Above is the edited part -->

<key>FullUserName</key>
<string>Tyler Smith</string>
<key>GmailCapabilitiesSupport</key>
<integer>2</integer>

You are now done. If you quit Mail and open a “New Message”, you will see an option to select multiple email addresses to send from, each with their own names.