Running the Email sample

Before you run the Email Output or Email Input parts of the sample, you must provide the required information in the email form, such as the email server URL.

  1. Running the Email Output part of the sample
  2. Running the Email Input part of the sample

Running the Email Output part of the sample

The Email Output part of the sample contains two message flows:

When you have deployed these message flows, there is no further configuration required to run the sample. Use a web browser client to complete the email form that is used in this sample.

If you encounter any problems when you run the sample, see Resolving problems when running samples in the IBM Integration Bus documentation.

Running the Email Output part of the sample:

  1. Launch a web browser client. In the URL request field type http://localhost:7080/hello. The email input form displays in the web browser.
  2. Enter the details of the Simple Mail Transfer Protocol (SMTP) server. For example, SMTP.my.company.com, then use the form as an email client. Ensure that the To and From fields contain valid email addresses.
  3. Complete the required and optional fields of the email form.
  4. To send the email message with any attachments, click Submit. If sending the email failed, details of the exception are displayed in the web browser. If the email is sent successfully, a confirmation message with the message identification is displayed in the web browser.
  5. If sending the email failed, click OK to display an empty email form. Complete the email form with the correct information and try sending the message again.

Running the Email Input part of the sample

The Email Input sample adds the following third message flow:

Prerequisite: Before running the Email Input part of the sample, ensure that you have completed the steps that are described in Setting up the Email Input sample.

When you have deployed the getemail message flow, use a web browser client to complete the email form that is used in this sample.

If you encounter any problems when you run the sample, see Resolving problems when running samples in the IBM Integration Bus documentation.

Running the Email Input part of the sample:

  1. Launch a web browser client. In the URL request field type http://localhost:7080/hello. The email input form displays in the web browser.
  2. Enter the details of the SMTP server. For example, SMTP.my.company.com, then use the form as an email client. Ensure that the To and From fields contain valid email addresses.
  3. Complete the required fields of the email form, add a subject, and some message body text.
  4. Click Submit. If sending the email failed, details of the exception are displayed in the web browser. If the email is sent successfully, a confirmation message with the message identification is displayed in the web browser.
  5. If sending the email failed, click OK to display an empty email form. Complete the email form with the correct information and try sending the message again.
  6. After the email poll interval, which is 5 seconds by default, the email text can be viewed on the WebSphere MQ queue EMAILOUT.
  7. Try sending an email with an attachment:
    1. Return to the email sending form in the web browser.
    2. Complete the required fields of the email form, add a subject, and some message body text.
    3. Click Choose File and select a file to be sent as an attachment.
    4. Select the correct Attachment Content Type from the menu to match the file type of the selected attachment. For example, for a .jpg image file, select application/octet-stream.
    5. Click Submit. If sending the email failed, details of the exception displays in the web browser. If the email is sent successfully, a confirmation message with the message identification displays in the web browser.
    6. If sending the email failed, click OK to display an empty email form. Complete the email form with the correct information and try sending the message again.
    7. After the email poll interval, which has a default of 5 seconds, the email attachment is saved to a file named email_attachment.dat, which has a default location of c:\temp\. Replace the extension name of the saved attachment file with the extension of the original file and view the contents.

Back to sample home