Sending Mail Using HTML

A process sends an email formatted in HTML and includes embedded images as an attachment.

Prerequisites

You must have the account settings for your mail server.

On Windows, copy the input folder from $TIBCO_HOME\bw\n.n\samples\palette\mail\attachment_files to C:\tmp.

On Unix, copy the input folder to /tmp.



Procedure

  1. In the samples directory, select palette > mail > HtmlMailWithImage and double-click tibco.bw.sample.palette.HtmlMailWithImage. For more information, see Accessing Samples.
  2. In the Project Explorer view, expand the tibco.bw.sample.palette.HtmlMailWithImage project.
  3. Set the default ApplicationProfile to match the OS you are running on. For more information, see Setting the Default Application Profile.
  4. Fully expand the Processes directory and double-click Sender.bwp.
  5. Click Run > Debug Configurations.
  6. At the left hand tree of Debug Configuration wizard, expand BusinessWorks Application and select BWApplication.
  7. Click the Applications tab and then click the Deselect All button if you have multiple applications. Select the check box next to tibco.bw.sample.palette.HtmlMailWithImage.Application.
  8. Click Debug.
    This runs the sample in Debug mode.
  9. Click the Terminate icon to stop the process.

Result

Your mail client receives an email showing the attachments, embedded in an HTML formatted message.

On Windows, the output.log output file is created in the c:/tmp/HtmlMailWithImage folder.

On UNIX, the output file is created in the \tmp\HtmlMailWithImage folder.