Log in

View Full Version : Ever wanted to change your Messaging account names?


Menneisyys
03-08-2006, 11:06 AM
Unfortunately, the built-in (it comes with all Windows Mobile versions) Messaging mailer application doesn't allow for changing already-existing account names, which has always caused a lot of problems. The account context menu, even in WM5, only allows for deleting a given account and not renaming it as can be seen in this screenshot (http://www.winmobiletech.com/032006RenameMessagingAccounts/AccountContextMenu.bmp.png).

So far, the only known way of "changing" their name was, therefore, deleting and recreating the accounts from scratch, which, in cases, involved a lot of work. Fortunately, now that I publish this tutorial, this will be changed.

What's the point in all this, you may ask. Why not just recreate the account?

Even the initial set up of the account (filling in your name, your account, your password, the POP3/IMAP4 and the SMTP server, setting the options etc. again) can be tiresome.

If you have self-defined folders in your account, they will all be gone and must be recreated – all by hand. What is more, if you have existing mails in these folders (or even in your Inbox folder), they will also be gone without your being able to restore them (unless you do some system-level hacking). You can't just save the mails in the folders of the to-be-deleted mailer account to folders that won't be deleted because Messaging doesn't allow for inter-account mail move/copy: you can only copy/move messages between local folders of the given account. And, as has already been pointed out, these all folders will just be gone when you delete the given account in order to recreate it with a new, better name.

Fortunately, renaming existing account names is pretty easy, particularly if you have a Pocket PC with a pre-Windows Mobile 5 operating system.

Pre-Windows Mobile 5 operating systems

Let's assume you want to change the account name 'wm' (see the left bottom corner in this screenshot (http://www.winmobiletech.com/032006RenameMessagingAccounts/WM2003SE-WM.bmp.png)) to something better.

Get Pocket dbExplorer (http://www.phatware.com/hpcdbex.html) (note that the otherwise excellent and, for database viewing, highly recommended, free Kenny Soft dbView (http://www.pocketpcfreewares.com/en/index.php?soft=152) can't edit database records, only delete them and, therefore, useless for us now). Note that the trial version will work just great.

Start dbExplorer. In the database list, tap-and-hold pmailFolders (it's the WindowsCE database that holds the account names); choose View/Modify from the context menu:

click for screenshot (http://www.winmobiletech.com/032006RenameMessagingAccounts/WM2003SE-WM-2.bmp.png)

Scroll down the list at the bottom until you see the ID '12289', highlight that attribute so that, in most cases, you don't need to scroll again when you move to the next records with the double right arrow, http://www.winmobiletech.com/032006RenameMessagingAccounts/dbexplDoubleRightArrow.png, at the bottom. (In cases, you will need to do this though.):

click for screenshot (http://www.winmobiletech.com/032006RenameMessagingAccounts/WM2003SE-WM-3.bmp.png)

Scroll to the next records while you run into the one that contains the record to be renamed (in this case, 'wm'):

click for screenshot (http://www.winmobiletech.com/032006RenameMessagingAccounts/WM2003SE-WM-4.bmp.png)

Enter the new account name in the text input area at the top:

click for screenshot (http://www.winmobiletech.com/032006RenameMessagingAccounts/WM2003SE-WM-5.bmp.png)

Having entered it, click OK and confirm. Then, after restarting Messaging, the new name will be used:

click for screenshot (http://www.winmobiletech.com/032006RenameMessagingAccounts/WM2003SE-WM-6.bmp.png)

That's all you need to know about pre-Windows Mobile 5 operating systems.

Windows Mobile 5

As far as WM5 itself is concerned, the situation isn't that easy because you can't directly edit the WinCE databases by hand (Pocket dbExplorer doesn't support WM5, not even the latest version). Therefore, your task is a bit more complicated under WM5.

Get SKTools (http://www.s-k-tools.com/sktools/feat.html). Unfortunately, you will need to register it as the unregistered trial version doesn't allow access to more than six databases and the database, pmailFolders, that we'll need to access will not be included in these (unlike the case with the trial version of Pocket dbExplorer). However, SKTools is a very nice, all-in-one tool and is, therefore, definitely worth the price.

Start SKTools and choose Databases:

click for screenshot (http://www.winmobiletech.com/032006RenameMessagingAccounts/SKToolsDB-1.bmp.png)

Tap-and-hold pmailFolders and choose Export:

click for screenshot (http://www.winmobiletech.com/032006RenameMessagingAccounts/SKTools-DB-pmailFoldersExport.bmp.png)

It'll tell you it worked:

click for screenshot (http://www.winmobiletech.com/032006RenameMessagingAccounts/SKTools-DB-pmailFoldersExport-2.bmp.png)

Now, transfer the newly-created file \My Documents\db_xml\pmailFolders.sk.xml from your PDA to your desktop and edit it there with any text editor, for example, Notepad. Note that you can edit the file right on the PDA too – or, if you use the WinCE FS plug-in in Total Commander, right in Total Commander, without the need to explicitly transfer it before (and after) the editing.

In the file editor, search for the old account name (in Notepad, F3), in this case, "OldAccountName". You'll see there're only one occurrence:

click for screenshot (http://www.winmobiletech.com/032006RenameMessagingAccounts/FileEditor-Search.png)

Now, just change this occurrence to the new account name (here, "NewAndGreatAccountName"):

click for screenshot (http://www.winmobiletech.com/032006RenameMessagingAccounts/FileEditor-Ch.png)

Note that you don't need to pay attention to the 'size' attribute just in front of the name – that is, you don't need to recalculate it.

Back in SKTools, empty the old database (tap-and-hold pmailFolders and choose Empty):

click for screenshot (http://www.winmobiletech.com/032006RenameMessagingAccounts/SKT-EmptypMailF.bmp.png)

The report of this operation should be successful:

click for screenshot (http://www.winmobiletech.com/032006RenameMessagingAccounts/SKT-EmptypMailF-2.bmp.png)

Now, choose the Action/Import menu item:

click for screenshot (http://www.winmobiletech.com/032006RenameMessagingAccounts/SKT-Import-1.bmp.png)

Choose the just-modified XML file (don't forget to transfer it back to your PDA if you edit it on the desktop!):

click for screenshot (http://www.winmobiletech.com/032006RenameMessagingAccounts/SKT-Import-2.bmp.png)

The report will also be successful:

click for screenshot (http://www.winmobiletech.com/032006RenameMessagingAccounts/SKT-Import-3.bmp.png)

Please note the following: under WM5, after you re-import the database, the old items will still be visible but not accessible any more (trying to access them may even result in gwes.exe crash messages). If the old items are still present on the server, they will be fetched again.

This is because Messaging creates new WinCE folder databases for all the standard (and extra) folders in the given account after the import. I'll work on fixing this problem and/or presenting a much better solution when I have some time. Until then, if the old messages' becoming not accessible is not a problem (because for example you don't have old messages at all), renaming done in the above way is absolutely safe.

Recommended reading

The Definitive Pocket PC Mail Client Roundup (http://www.pocketpcmag.com/blogs/index.php?blog=3&p=569&more=1) - everything you may need to know about mailers on the Pocket PC.

Perferably for tech freaks/ hackers/ coders - this is how the WinCE mailer databases work (http://www.pocketpcmag.com/blogs/index.php?blog=3&p=231&more=1).

And, of course, my blog (http://www.pocketpcmag.com/blogs/index.php?blog=3), which is full of genuine, never-before-published tutorials, hacks, reviews. You'll love it, I'm sure :)