Share via


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
System_CAPS_pubmethod HostedEmailAdaptorException()

Initializes a new instance of the HostedEmailAdaptorException class.

System_CAPS_pubmethod HostedEmailAdaptorException(HostedEmailAdaptorErrorCode, AddinErrorRecord)

Initializes a new instance of the HostedEmailAdaptorException class using the specified error code and record.

System_CAPS_protmethod HostedEmailAdaptorException(SerializationInfo, StreamingContext)

Initializes a new instance of the HostedEmailAdaptorException class with serialized data.

System_CAPS_pubmethod HostedEmailAdaptorException(String)

Initializes a new instance of the HostedEmailAdaptorException class using the specified error.

System_CAPS_pubmethod 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
System_CAPS_pubproperty Data

(Inherited from Exception.)

System_CAPS_pubproperty ErrorCode

Retrieves the error code of the exception.

System_CAPS_pubproperty ErrorRecord

Retrieves details of the exception.

System_CAPS_pubproperty HelpLink

(Inherited from Exception.)

System_CAPS_pubproperty HResult

(Inherited from Exception.)

System_CAPS_pubproperty InnerException

(Inherited from Exception.)

System_CAPS_pubproperty Message

(Inherited from Exception.)

System_CAPS_pubproperty Source

(Inherited from Exception.)

System_CAPS_pubproperty StackTrace

(Inherited from Exception.)

System_CAPS_pubproperty TargetSite

(Inherited from Exception.)

Methods

Name Description
System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetBaseException()

(Inherited from Exception.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetObjectData(SerializationInfo, StreamingContext)

Sets the serialization information with the specified information and context.(Overrides Exception.GetObjectData(SerializationInfo, StreamingContext).)

System_CAPS_pubmethod GetType()

(Inherited from Exception.)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod ToString()

(Inherited from Exception.)

Events

Name Description
System_CAPS_protevent 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