diff -r ae94777fff8f -r 59758314f811 Symbian3/PDK/Source/GUID-1DCB0B64-0B70-4F34-81A7-E00A996AD626.dita --- a/Symbian3/PDK/Source/GUID-1DCB0B64-0B70-4F34-81A7-E00A996AD626.dita Fri Jun 11 12:39:03 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-1DCB0B64-0B70-4F34-81A7-E00A996AD626.dita Fri Jun 11 15:24:34 2010 +0100 @@ -1,73 +1,73 @@ - - - - - -Listing, -Accessing and Launching MailboxesThis section describes how to list, access and launch mailboxes -using Email Client APIs. -

Email Client -provides MEmailMailbox::GetMailboxesL() method to list -all the mailboxes. MEmailMailbox::ShowInboxL() method is -used to launch a specific mailbox in the email application.

- -Create an instance -of MEmailClientApi class. -

EmailInterfaceFactory* factory = CEmailInterfaceFactory::NewL(); -CleanupStack::PushL( factory ); -MEmailClientApi* mailClient = static_cast<MEmailClientApi*>(factory->InterfaceL( KEmailClientApiInterface ) );

-
-Get the mailboxes -using MEmailMailbox::GetMailboxesL(RMailboxPtrArray& aMailboxes). -

RMailboxPtrArray mailboxes; -CCleanupResetAndRelease<MEmailMailbox>::PushL( mailboxes ); -mailClient->GetMailboxesL( mailboxes ); -

-
-Launch the inbox -using MEmailMailbox::ShowInboxL(). -

mailbox->ShowInboxL();

To access a mailbox -using its address, use MEmailMailbox::MailboxL( const TPtrC& -aAddress) method.

-
-
-

The following code snippet shows an example of how to list the -mailboxes.

TInt CEmailClientApiTester::GetMailboxListL( CItemParser& /*aItem*/ ) - { - TInt ret(KErrNone); - - CEmailInterfaceFactory* factory = CEmailInterfaceFactory::NewL(); - CleanupStack::PushL( factory ); - MEmailClientApi* mailClient = static_cast<MEmailClientApi*>(factory->InterfaceL( KEmailClientApiInterface ) ); - if ( mailClient ) - { - CleanupReleasePushL( *mailClient ); - RMailboxPtrArray mailboxes; - mailClient->GetMailboxesL( mailboxes );// Get the mailboxes - for ( TInt i = 0; i < mailboxes.Count(); i++ ) - { - MEmailMailbox* mailbox = mailboxes[i]; - iLog->Log( _L( "%S id=%d" ), &mailbox->MailboxName(), mailbox->MailboxId().iId ); - mailbox->Release(); //Release the memory - } - mailboxes.Close(); - CleanupStack::PopAndDestroy();// mailClient - } - CleanupStack::PopAndDestroy(factory); - return ret; - } -

-
-Email Client -API Overview -Creating, -Replying and Forwarding Email Messages -Searching -Email Messages + + + + + +Listing, +Accessing and Launching MailboxesThis section describes how to list, access and launch mailboxes +using Email Client APIs. +

Email Client +provides MEmailMailbox::GetMailboxesL() method to list +all the mailboxes. MEmailMailbox::ShowInboxL() method is +used to launch a specific mailbox in the email application.

+ +Create an instance +of MEmailClientApi class. +

EmailInterfaceFactory* factory = CEmailInterfaceFactory::NewL(); +CleanupStack::PushL( factory ); +MEmailClientApi* mailClient = static_cast<MEmailClientApi*>(factory->InterfaceL( KEmailClientApiInterface ) );

+
+Get the mailboxes +using MEmailMailbox::GetMailboxesL(RMailboxPtrArray& aMailboxes). +

RMailboxPtrArray mailboxes; +CCleanupResetAndRelease<MEmailMailbox>::PushL( mailboxes ); +mailClient->GetMailboxesL( mailboxes ); +

+
+Launch the inbox +using MEmailMailbox::ShowInboxL(). +

mailbox->ShowInboxL();

To access a mailbox +using its address, use MEmailMailbox::MailboxL( const TPtrC& +aAddress) method.

+
+
+

The following code snippet shows an example of how to list the +mailboxes.

TInt CEmailClientApiTester::GetMailboxListL( CItemParser& /*aItem*/ ) + { + TInt ret(KErrNone); + + CEmailInterfaceFactory* factory = CEmailInterfaceFactory::NewL(); + CleanupStack::PushL( factory ); + MEmailClientApi* mailClient = static_cast<MEmailClientApi*>(factory->InterfaceL( KEmailClientApiInterface ) ); + if ( mailClient ) + { + CleanupReleasePushL( *mailClient ); + RMailboxPtrArray mailboxes; + mailClient->GetMailboxesL( mailboxes );// Get the mailboxes + for ( TInt i = 0; i < mailboxes.Count(); i++ ) + { + MEmailMailbox* mailbox = mailboxes[i]; + iLog->Log( _L( "%S id=%d" ), &mailbox->MailboxName(), mailbox->MailboxId().iId ); + mailbox->Release(); //Release the memory + } + mailboxes.Close(); + CleanupStack::PopAndDestroy();// mailClient + } + CleanupStack::PopAndDestroy(factory); + return ret; + } +

+
+Email Client +API Overview +Creating, +Replying and Forwarding Email Messages +Searching +Email Messages
\ No newline at end of file