HostedEmailAdaptorErrorCode Enumeration
Describes the error codes for the hosted email adapter framework.
Assembly: Wssg.HostedEmailBase (in Wssg.HostedEmailBase.dll)
| Member name | Description | |
|---|---|---|
| AccountAlreadyExists | The account the user is attempting to create already exists. | |
| AccountNotExists | The account the user is attempting to update or delete does not exist. | |
| AuthenticationFailure | The sign in account is invalid. | |
| Custom | An error defined by this implementation has occurred. | |
| InsufficientPermission | The sign-in account is not the tenant administrator account. | |
| InvalidEmailAddress | The email address is invalid. | |
| NoError | No error has occurred. | |
| ServiceNotReachable | The system cannot connect to the mail service. |
These error codes are used primarily by HostedEmailAdaptorException to describe errors.
The following code describes using the HostedEmailAdaptorErrorCode in an exception call. For the complete sample, see Quickstart: Creating a Hosted Email Adapter.
public void ValidateEmailAddress(string email)
{
// email domain might be checked as well but this is bypassed in this example
if (string.IsNullOrWhiteSpace(email) || !emailAddressPattern.Match(email).Success)
{
throw new HostedEmailAdaptorException(HostedEmailAdaptorErrorCode.InvalidEmailAddress, null);
}
}
Community Additions
ADD
Show: