IHostedEmailAdaptor.ResetPassword Method (String, String)
Resets the password for an existing email account.
Namespace: Microsoft.WindowsServerSolutions.HostedEmail
Assembly: Wssg.HostedEmailBase (in Wssg.HostedEmailBase.dll)
Syntax
void ResetPassword(
string accountId,
string password
)
void ResetPassword(
String^ accountId,
String^ password
)
Sub ResetPassword (
accountId As String,
password As String
)
Parameters
accountId
Type: System.StringThe ID of the email account.
password
Type: System.StringThe new password.
Remarks
This method is called by BeginResetPassword and ResetPassword.
If your adapter does not support this method, be sure to tag your implementation method with NotSupportedAPIAttribute.
Examples
The following code implements the ResetPassword method. For the complete code, see Quickstart: Creating a Hosted Email Adapter.
public void ResetPassword(string accountId, string password)
{
try
{
EmailService.GetAccountById(accountId);
EmailService.ResetPassword(accountId, password);
}
catch (AccountNotExistsException)
{
throw new HostedEmailAdaptorException(HostedEmailAdaptorErrorCode.AccountNotExists, new AddinErrorRecord()
{
Message = Resources.ErrMsg_OnlineUserNotExist,
Title = Resources.ErrTitle_OnlineUserNotExist,
});
}
}
See Also
IHostedEmailAdaptor Interface
Microsoft.WindowsServerSolutions.HostedEmail Namespace
Return to top