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-2000 Microsoft Corporation. All rights reserved.