Creating a Receiving Agent for SMTP Transport
The SendSMTP component can send e-mail to any mail recipient. However, in order to receive a business data object and pass it to an application on the receive side, the receiving mail system must invoke the receive pipeline.
If you are using Microsoft® Exchange 5.5, you can run a Visual Basic script to invoke an OrderPipeline object (but not an MtsPipeline or MtsTxPipeline) on the Exchange server when mail arrives in the designated mailbox to process the received messages. Commerce Server includes the Recvsmtp.vbs example script, which is installed into \Microsoft Site Server\SiteServer\Commerce\. The following procedure describes how to use this script with an Exchange 5.5 mail server and Microsoft Outlook 8.03 installed on a client computer that connects to the Exchange server.
To create a receiving agent
-
Create a new alias (for this example, name this alias Client1) on the Exchange 5.5 server (Server1) to monitor and program the receiving script.
-
Start the Outlook 8.03 client on any computer on the network. Log on with a profile that chooses the alias Client1 on Server1.
-
Create a public folder called CIReceive (for “Commerce Interchange Receive”).
-
υOn the File menu, point to New, and then click Folder.
-
υIn the Make this folder a subfolder of box, expand Public Folders, and then click All Public Folders.
-
υIn the Name box, type a name for the new folder.
-
υClick OK to create the folder.
-
Grant users permissions to run scripts.
-
υIn the Administrator window, select the System Folders container for your organization.
-
υClick Events Root, and then select the EventConfig folder that corresponds to the Microsoft Exchange Server computer on which the folder owner should be granted permission.
-
υOn the File menu, click Properties.
-
υClick Client Permissions.
-
υClick Add, and then select the user (Client1) who will have permission to run applications or other event handlers on this server.
-
υIn the Roles box, select the Editor role. This enables the user to create scripts that handle events on this server.
-
Make the chosen public folder accept mail.
-
υIn the Administrator window, select the Public Folders container for your organization.
-
υSelect the CIReceive folder that you created in Step 3.
-
υOn the File menu, click Properties.
-
υClick the Advanced tab. Clear the Hide from address book check box.
-
υClick the E-mail Address tab. Write down the e-mail address corresponding to SMTP (CIReceive@org1.com, in this example). Use this e-mail address for the SMTP Host when configuring the SendSMTP component for your Commerce Interchange transmit pipeline
-
Create a new script.
-
υUsing the Outlook client, select the CIReceive public folder.
-
υOn the File menu, click Properties.
-
υClick the Agents tab, and then click New.
-
υType a name for the new agent.
-
υSelect the event A new item is posted in the folder to enable the agent to respond when a new item is posted.
-
υClick Edit Script. If Microsoft® Visual InterDev™ is installed, it is started with a blank script that you can edit. If it is not installed, Notepad is started with a blank script.
-
υCopy the Visual Basic script from \Microsoft Site Server\SiteServer\Commerce\recvsmtp.vbs, and then paste it into the blank file. Make any desired changes, and then save the file and exit from Visual InterDev or Notepad.
-
υClick OK to save the new agent.
© 1997-1998 Microsoft Corporation. All rights reserved.