HostedEmailAdaptorException Class
The exception that occurs when managing the hosted email adapter.
Namespace: Microsoft.WindowsServerSolutions.HostedEmail
Assembly: Wssg.HostedEmailBase (in Wssg.HostedEmailBase.dll)
Inheritance Hierarchy
System.Object
System.Exception
Microsoft.WindowsServerSolutions.HostedEmail.HostedEmailAdaptorException
Syntax
[SerializableAttribute]
public class HostedEmailAdaptorException : Exception
[SerializableAttribute]
public ref class HostedEmailAdaptorException : Exception
<SerializableAttribute>
Public Class HostedEmailAdaptorException
Inherits Exception
Constructors
Name | Description | |
---|---|---|
HostedEmailAdaptorException() | Initializes a new instance of the HostedEmailAdaptorException class. |
|
HostedEmailAdaptorException(HostedEmailAdaptorErrorCode, AddinErrorRecord) | Initializes a new instance of the HostedEmailAdaptorException class using the specified error code and record. |
|
HostedEmailAdaptorException(SerializationInfo, StreamingContext) | Initializes a new instance of the HostedEmailAdaptorException class with serialized data. |
|
HostedEmailAdaptorException(String) | Initializes a new instance of the HostedEmailAdaptorException class using the specified error. |
|
HostedEmailAdaptorException(String, Exception) | Initializes a new instance of the HostedEmailAdaptorException class using the specified error and a reference to the inner exception that is the cause of this exception.. |
Properties
Name | Description | |
---|---|---|
Data | (Inherited from Exception.) |
|
ErrorCode | Retrieves the error code of the exception. |
|
ErrorRecord | Retrieves details of the exception. |
|
HelpLink | (Inherited from Exception.) |
|
HResult | (Inherited from Exception.) |
|
InnerException | (Inherited from Exception.) |
|
Message | (Inherited from Exception.) |
|
Source | (Inherited from Exception.) |
|
StackTrace | (Inherited from Exception.) |
|
TargetSite | (Inherited from Exception.) |
Methods
Name | Description | |
---|---|---|
Equals(Object) | (Inherited from Object.) |
|
Finalize() | (Inherited from Object.) |
|
GetBaseException() | (Inherited from Exception.) |
|
GetHashCode() | (Inherited from Object.) |
|
GetObjectData(SerializationInfo, StreamingContext) | Sets the serialization information with the specified information and context.(Overrides Exception.GetObjectData(SerializationInfo, StreamingContext).) |
|
GetType() | (Inherited from Exception.) |
|
MemberwiseClone() | (Inherited from Object.) |
|
ToString() | (Inherited from Exception.) |
Events
Name | Description | |
---|---|---|
SerializeObjectState | (Inherited from Exception.) |
Remarks
This exception occurs as a consequence of making calls to the hosted email service, and may show up in your implementation code.
Examples
The following code describes using the HostedEmailAdaptorException to indicate an invalid email address. 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);
}
}
Thread Safety
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also
Microsoft.WindowsServerSolutions.HostedEmail Namespace
Return to top