SmtpSession.Properties Property
When overridden in a derived class, the Properties property gets or sets an indexer for custom session properties.
Namespace: Microsoft.Exchange.Data.Transport.Smtp
Assembly: Microsoft.Exchange.Data.Transport (in microsoft.exchange.data.transport.dll)
Syntax
'Declaration
Public MustOverride Property Properties As IDictionary(Of String, Object)
public abstract IDictionary<string,Object> Properties { get; }
public:
virtual property IDictionary<String^, Object^>^ Properties {
IDictionary<String^, Object^>^ get () abstract;
}
/** @property */
public abstract IDictionary<String,Object> get_Properties ()
public abstract function get Properties () : IDictionary<String,Object>
Property Value
When overridden in a derived class, the Properties property returns a dictionary object.
Remarks
The indexer provides access to the session properties by using a string for the key for each property.
The Connection Filtering agent that ships with Microsoft Exchange Server 2007 uses the named properties that are listed in the following table.
Property Name |
Description |
Microsoft.Exchange.IsOnAllowList |
The Boolean value of this property is set to true if the IP address of the server that is sending the message is on the list of servers that are allowed to send messages to this server. If the server is not on the allow list, the value is set to false. |
Microsoft.Exchange.IsOnDenyList |
The Boolean value of this property is set to true if the IP address of the server that is sending the message is on the list of servers that are not allowed to send messages to this server. If the IP address is not on the deny list, the value is set to false. |
Microsoft.Exchange.IsOnBlockList |
The Boolean value of this property is set to true if the IP address of the server that is sending the message is on a block list from a block list provider. If the IP address is not on a block list, the value of this property is set to false. |
Microsoft.Exchange.IsOnSafeList |
The Boolean value of this property is set to true if the IP address of the server that is sending the message is on an allow list from an allow list provider. If the IP address is not on an allow list, the value of this property is set to false. |
Microsoft.Exchange.IsOnBlockListErrorMessage |
The string value of this property is set to the error message that is returned from the block list provider when the IP address of the server that is sending the message is on the block list of the block list provider. |
Microsoft.Exchange.IsOnBlockListProvider |
The string value of this property is set to the name of the provider that blocked the connection. |
Example
The following code example shows how to get the value of the Microsoft.Exchange.IsOnBlockListErrorMessage property.
string errorMessage = null;
if (smtpSession.Properties.ContainsKey("Microsoft.Exchange.IsOnBlockListErrorMessage"))
{
errorMessage = smtpSession.Properties["Microsoft.Exchange.IsOnBlockListErrorMessage"] as string;
}
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.
Platforms
Development Platforms
Windows XP Professional with Service Pack 2 (SP2), Windows Server 2003,
Target Platforms
Windows Server 2003
See Also