WebSphere Adapter for Email

Creating events

The first step in testing the inbound sample application is to create events for the adapter to process. The program supplied with the samples files works for both pass-through and non-pass-through mode, although the events that are created by the sample bat files for pass-through scenario testing will be different from the ones created for non-pass-through scenario tests. The mail format is the same, but the content and attachments will differ. The batch file createEvents.bat provides a command line interface to the EmailEventCreator. If you wish, you may edit the batch file and provide several parameters to create events.

About this task

Artifacts have been shipped on the product CD for creating the tutorial scenario's inbound events. For more information on these artifacts, see the related references.
Parameter values for customizing CreateEvents.bat
Parameter Value
Host the IP address of the mail server
Port Port number
Number of events to be created Total number of events required for the test
From The mail ID for the mail account from which the mail was written
To The mail ID for the mail account to which the mail is to be written
CC The mail ID for the mail account on the cc of the mail
BCC The mail ID for the mail account on the bcc of the mail
Subject Subject line content for the mail event
Content Sample pass-through text content for the mail
Path for event file name The path to the local folder where the event file attachment (for example, MyAddress.xml) has been stored.
Boolean for passthru/nonpassthru true or false value indicating whether or not you would like to use a pass-through or non-pass-through scenario. True= pass-through.

To create events using the EventCreator, follow these steps:

How to perform this task

  1. Unzip the EmailEventCreator.zip to a <samples_temp> directory.
  2. Optional: If you want to create custom events, you may edit the following command line parameters in the createEvents.bat file:
    Parameter values for customizing CreateEvents.bat
    Parameter Value
    Host the IP address of the mail server
    Port Port number
    Number of events to be created Total number of events required for the test
    From The mail ID for the mail account from which the mail was written
    To The mail ID for the mail account to which the mail is to be written
    CC The mail ID for the mail account on the carbon copy of the mail
    BCC The mail ID for the mail account on the blind carbon copy of the mail
    Subject Subject line content for the mail event
    Content Sample pass-through text content for the mail
    Path for event file name The path to the local folder where the event file attachment (for example, MyAddress.xml) has been stored.
    Boolean for passthru/nonpassthru true or false value indicating whether or not you would like to use a pass-through or non-pass-through scenario. True= pass-through.
    • For pass-through, enter: java EmailEventCreator localhost 125 10 from@in.ibm.com to@in.ibm.com cc@in.ibm.com bcc@in.ibm.com TestEmail TestPassthruContent C:\EmailRA\Samples\MyPicture.jpg true will create 10 events from the user from@in.ibm.com on the localhost mail server with the content from the C:\EmailRA\Samples\MyPicture.jpg attached to the mail. The other attributes of the mail specified by the user will be incorporated on each mail event created by the bat file.
    • For non-pass-through, enter: java EmailEventCreator localhost 125 10 from@in.ibm.com to@in.ibm.com cc@in.ibm.com bcc@in.ibm.com TestEmail TestXMLContent C:\EmailRA\Samples\MyAddress.xml false will create 10 events from the user venkatre@in.ibm.com on the localhost mail server with the content from the C:\EmailRA\Samples\MyAddress.xml attached to the mail. The other attributes of the mail specified by the user will be incorporated on each mail event created by the bat file.
  3. Run either the createEvents.bat file you edited or one of the sample createEvents.bat files supplied to you by double-clicking the file.
  4. Verify that the events were transmitted successfully using the mail client before starting the adapter.

Terms of use |

Last updated: Mon 30 Oct 2006 03:44:38

(c) Copyright IBM Corporation 2005, 2006.
This information center is powered by Eclipse technology (http://www.eclipse.org)