Open main menu

lensowiki β

Changes

Mail tweaks on iPhone OS

2,723 bytes added, 08:26, 15 November 2009
Created page with 'Once, I had sent an email from an IMAP account on my iPhone. The message was sent fine, as the recipient then replied to it. On the iPhone, things seemed ok, as the message showe…'
Once, I had sent an email from an IMAP account on my iPhone. The message was sent fine, as the recipient then replied to it. On the iPhone, things seemed ok, as the message showed up in my Sent folder. ''However, the IMAP server itself had absolutely no awareness of the message.'' To rectify the problem, I attempted to move the message to a different folder. I tried the Inbox, Drafts, Inbox subfolders, etc. Nothing worked. The iPhone showed the message in the correct folder, but the server still had no knowledge of it. Not wanting to lose the message, I decided to explore the iPhone filesystem to see if I could recover the message somehow.

These instructions assume that your device is already jailbroken and you have installed OpenSSH to browse files on it. If that's not the case, please [http://blog.iphone-dev.org visit the official Dev team website] for instructions on how to jailbreak your device. Once that's done, open Cydia and install OpenSSH. '''''Please immediately [http://www.iphonefaq.org/archives/97721 change your root password] after you do this to prevent your device from being hijacked.''''' Once that's done, you will need an SFTP client for your computer to browse and transfer files. That is beyond the scope of this tutorial, so [http://www.google.com/search?q=browse%20files%20iphone%20openssh Google is your friend].

To recover your message(s):
#Connect to your device
#Note that to prevent your phone's wifi from shutting off and potentially interrupting the process, you'll need to either
#*turn off auto-lock
#*tap your screen every so often
#*or install Insomnia
#*(or just work very very quickly :))
#Navigate to <tt>/private/var/mobile/Library/Mail</tt>
#Now open the folder corresponding to the email account from which you sent the message (should be self-evident)
#Open the .OfflineCache folder inside that. Note that you might need to turn on showing of hidden files in your SFTP client to see this folder in the first place

Now, inside this folder, you should see one or more files. Download all of the files to your computer and open them in any text editor to verify that they are what you are looking for. If so, append the <tt>.eml</tt> extension to them. Accept whatever warning your OS might throw up about changing/adding file extensions.

Finally, use a desktop email client to import the recalcitrant message (the .eml files) into the correct folder. Once you've verified that the message is on the server, you can delete the copy inside .OfflineCache if you want. If you'd rather play safe, just leave it there – the message will show up twice in whatever folder it's in when viewing on the phone, but the only thing that really matters is what's on the server.
1,277
edits