Implementing SmtpReceiveAgent Agents

Topic Last Modified: 2007-06-20

The SmtpReceiveAgentFactory and SmtpReceiveAgent classes provide support for the extension of the Microsoft Exchange Server 2007 Edge Transport behavior. You can use these classes to implement transport agents that are designed to respond to messages coming into and going out of the organization.

Using SmptReceiveAgentFactory and SmtpReceiveAgent Class Event Handlers

The SmtpReceiveAgentFactory and SmtpReceiveAgent classes include the following event handlers:

  • OnAuthCommand Use this event when your agent requires information that is provided only in the Simple Mail Transfer Protocol (SMTP) AUTH command, such as an agent that accepts or rejects message delivery attempts based on the type of authorization method used.
  • OnConnect   Use this event when your agent requires information that is provided only when an SMTP attempts to connect to the Exchange 2007 computer that is running the Edge Transport server role, such as an agent that performs an action based on the address or domain of the remote SMTP server.
  • OnDataCommand   Use this event when your agent requires information that is provided in the SMPT AUTH command.
  • OnDisconnect   Use this event when your agent requires information that is available at the time of disconnection, such as the current date and time, in order to perform processing time calculations.
  • OnEhloCommand   Use this event when your agent requires information that is provided in the SMPT EHLO command, such as an agent that accepts or rejects messages based on the identity provided in the EHLO command.
  • OnEndOfAuthentication   Use this event when your agent requires information that is available after the remote server completes the authentication process, such as an agent that performs an action on a message based on the authentication information provided by the remote SMTP server.
  • OnEndOfData   Use this event when your agent must perform an action based on data that is available in the entire message.
  • OnEndOfHeaders   Use this event when your agent must perform an action based on information that is available in the headers of the submitted message.

See Also

Reference

SmtpReceiveAgent

Concepts

Implementing RoutingAgent Agents

Other Resources

Transport Agents