HostedEmailAdaptorException Class

 

The exception that occurs when managing the hosted email adapter.

Namespace:   Microsoft.WindowsServerSolutions.HostedEmail
Assembly:  Wssg.HostedEmailBase (in Wssg.HostedEmailBase.dll)

System::Object
  System::Exception
    Microsoft.WindowsServerSolutions.HostedEmail::HostedEmailAdaptorException

[SerializableAttribute]
public ref class HostedEmailAdaptorException : Exception

NameDescription
System_CAPS_pubmethodHostedEmailAdaptorException()

Initializes a new instance of the HostedEmailAdaptorException class.

System_CAPS_pubmethodHostedEmailAdaptorException(HostedEmailAdaptorErrorCode, AddinErrorRecord^)

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

System_CAPS_protmethodHostedEmailAdaptorException(SerializationInfo^, StreamingContext)

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

System_CAPS_pubmethodHostedEmailAdaptorException(String^)

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

System_CAPS_pubmethodHostedEmailAdaptorException(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..

NameDescription
System_CAPS_pubpropertyData

(Inherited from Exception.)

System_CAPS_pubpropertyErrorCode

Retrieves the error code of the exception.

System_CAPS_pubpropertyErrorRecord

Retrieves details of the exception.

System_CAPS_pubpropertyHelpLink

(Inherited from Exception.)

System_CAPS_pubpropertyHResult

(Inherited from Exception.)

System_CAPS_pubpropertyInnerException

(Inherited from Exception.)

System_CAPS_pubpropertyMessage

(Inherited from Exception.)

System_CAPS_pubpropertySource

(Inherited from Exception.)

System_CAPS_pubpropertyStackTrace

(Inherited from Exception.)

System_CAPS_pubpropertyTargetSite

(Inherited from Exception.)

NameDescription
System_CAPS_pubmethodEquals(Object^)

(Inherited from Object.)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_pubmethodGetBaseException()

(Inherited from Exception.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetObjectData(SerializationInfo^, StreamingContext)

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

System_CAPS_pubmethodGetType()

(Inherited from Exception.)

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodToString()

(Inherited from Exception.)

NameDescription
System_CAPS_proteventSerializeObjectState

(Inherited from Exception.)

This exception occurs as a consequence of making calls to the hosted email service, and may show up in your implementation code.

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);
            }
        }

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top

Community Additions

ADD
Show: