HostedEmailAdaptorErrorCode Enumeration
Describes the error codes for the hosted email adapter framework.
Namespace: Microsoft.WindowsServerSolutions.HostedEmail
Assembly: Wssg.HostedEmailBase (in Wssg.HostedEmailBase.dll)
Syntax
public enum HostedEmailAdaptorErrorCode
public enum class HostedEmailAdaptorErrorCode
Public Enumeration HostedEmailAdaptorErrorCode
Members
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. |
Remarks
These error codes are used primarily by HostedEmailAdaptorException to describe errors.
Examples
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);
}
}
See Also
Microsoft.WindowsServerSolutions.HostedEmail Namespace
Return to top