Partager via


IHostedEmailAdaptor.UpdateAccount Method (EmailAccountInfo)

 

Updates the account information of an existing email account.

Namespace:   Microsoft.WindowsServerSolutions.HostedEmail
Assembly:  Wssg.HostedEmailBase (in Wssg.HostedEmailBase.dll)

Syntax

void UpdateAccount(
    EmailAccountInfo info
)
void UpdateAccount(
    EmailAccountInfo^ info
)
Sub UpdateAccount (
    info As EmailAccountInfo
)

Parameters

Remarks

This method is called by BeginUpdateAccount and UpdateAccount.

You should specify in the info parameter the account ID of the account to update.

Examples

The following code implements UpdateAccount. For the complete code example, see Quickstart: Creating a Hosted Email Adapter.

public void UpdateAccount(EmailAccountInfo info)
 {
     try
     {
         EmailService.UpdateAccount(info);
     }
     catch (AccountNotExistsException)
     {
         throw new HostedEmailAdaptorException(HostedEmailAdaptorErrorCode.AccountNotExists, null);
     }
     catch (AccountExistsException)
     {
         throw new HostedEmailAdaptorException(HostedEmailAdaptorErrorCode.AccountAlreadyExists, null);
     }
     catch (InvalidEmailAddressException)
     {
         throw new HostedEmailAdaptorException(HostedEmailAdaptorErrorCode.InvalidEmailAddress, null);
     }
 }

See Also

IHostedEmailAdaptor Interface
Microsoft.WindowsServerSolutions.HostedEmail Namespace

Return to top