Nov
29
2008

Multiple Addresses, One E-Mail Account In MobileMail

MobileMail’s configuration options on the iPhone don’t allow you to specify multiple addresses for a single e-mail account. I found this article which provides a long winded method – you add a new account for each address you need. Thankfully, if you have a jailbroken iPhone, there is a much easier way.

The MobileMail configuration options get saved in the mobile user’s home directory (/var/mobile/Library/Mail). The directory contains two config files and your actual e-mail folders. The information about accounts is held in Accounts.plist.

Use SCP to transfer the file to your computer and then open it up with your favourite editor, but first check that it is in the correct format:

host:~ user$ scp mobile@iPhone:/var/mobile/Library/Mail/Accounts.plist .
host:~ user$ file Accounts.plist
Accounts.plist: XML  document text
host:~ user$ nano Accounts.plist

If the file command says ‘Apple binary property list’, go and read my post about binary property lists.

The file is an XML property list, it contains a number of <dict>, <array> and <key> elements. Find the <key> called MailAccounts, it should contain an array and some dict elements. One of the dicts will contain an AccountName key, there will be multiple AccountNames if you have set up more than one account. The <string> element following the AccountName key matches the ‘Description’ field on the Add Mail Account form in Settings.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>DeliveryAccounts</key>
    <array>
      <!-- data removed --!>
    </array>
    <key>MailAccounts</key>
    <array>
      <dict>
        <key>AccountPath</key>
        <string>~/Library/Mail/Mailboxes</string>
      </dict>
      <dict>
        <key>AccountName</key>
        <string>My New Email Account</string>
        <key>AccountType</key>
        <string>IMAPAccount</string>
        <key>EmailAddresses</key>
        <array>
          <string>address1@foo.com</string>
          <string>address2@bar.com</string>
        </array>
      </dict>
    </array>
  </dict>
</plist>

The array of strings highlighted in blue is the list of email addresses for this account, you can add as many as you like. Save the file and scp it back into place:

host:~ user$ scp Accounts.plist mobile@iPhone:/var/mobile/Library/Mail

Now when you write new e-mail messages, you’ll be able to tap the address in the ‘From’ field and select from the ones you added to the plist file.

Written by theboywho | Tags: , ,

2 Comments »

  • I need to get some information on how to mail the same
    email to many addresses. If I put down more than two I
    get a failed message that says syntax error, check your
    addresses again. At present I have a hundred addresses
    I need to contact concerning a fund raiser for Peace House
    homeless drop in center. Please reply if you can.

    Comment | October 15, 2009
  • theboywho

    I’m guessing you mean that you want to compose an email message in MobileMail and send it to multiple recipients. To do this you enter each email address followed by the return key into the To: box. When you hit return after entering an address, it’ll be surrounded by a blue bubble.

    Comment | October 16, 2009

RSS feed for comments on this post. TrackBack URL

Leave a comment

WordPress | Aeros