.NET Components for Mobility

Deleting Email Accounts

Last post 07-24-2008 12:53 PM by DaveK17. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 07-23-2008 1:00 PM

    Deleting Email Accounts

    Hi There

    Firstly, great component, especially the CEMAPI stuff thats a real life save for me not having great C++ skills.  I'm currently using the eval version 3.2 and looking forward to buying it permanently.

    My problem is that whilst i can delete "emails" I cannot seem to delete email accounts totally.  The code I use for deleting actual email is below:

    InTheHand.WindowsMobile.PocketOutlook.OutlookSession acc = new InTheHand.WindowsMobile.PocketOutlook.OutlookSession();

    int a = acc.EmailAccounts.Count;

    for (int i=0; i < a; i++ )

    {

    foreach (InTheHand.WindowsMobile.PocketOutlook.EmailMessage eACC in acc.EmailAccounts[ i ].Inbox)

    {

    MessageBox.Show(eACC.Subject);

    eACC.Delete();

    }

    }

    However I have been using the "RemoveAT" functionality of the emailaccounts collection but it just doesn't work and the accounts remain none the less. 

    The code I use for this is:

    acc.EmailAccounts.RemoveAT(i);

    I think the activeSync and any windows live accounts are not deletable but I do have a number of POP and IMAP accounts on the phone that should be deletable.

    No errors are being thrown, the code executes but nothing happens on the device.

    I am using an M3100 (Hermes) with WM6 on it but the same happens on a Symbol MC35 with WM5.

    Any help is greatly appreciated.


    DaveK

  • 07-24-2008 12:15 PM In reply to

    Re: Deleting Email Accounts

    That is correct, this is not currently supported. The RemoveAt method is inherited from the base class System.Collections.CollectionBase and while it removes the item from the account collection does not delete the underlying account. I'm investigating adding this functionality into the next release.

    Peter

    Peter Foot
    Microsoft Device Application Development MVP
    www.peterfoot.net | www.inthehand.com
  • 07-24-2008 12:53 PM In reply to

    Re: Deleting Email Accounts

    Hi Peter

    Thank-you very much for getting back to me.

    Regards

    Dave

Page 1 of 1 (3 items)
Copyright © 2001-2008 In The Hand Ltd. All rights reserved. Terms of Use and Privacy Policy.