Skip to Content
avatar image
Former Member

How to attach xml file and send by using send mail atom


According to the on-line document, There are several options to add attachments to the e-mail e.g. <attachment> and <BodyPart>. I have some problems and questions below.

1. Option 1: How to attach file in the body part.

  1. Does the parameter "filePath" mean source path or target path?
  2. How to attach an xml file in the body part
  3. Let's say if there are 10 files in a "FILO" folder, I want to pickup one by one following FIFO and then send email with attachment via smtp, How to determine the full file path including the file name at run-time/dynamically?

2. Option 2: I always got an extra root element <attachment> in the attachment. we don't want to send this root element to the receiver system.


<attachment doc="PickResult.xml" pltype="xml">
<xsl:copy-of select="$msg/*"/>

On-line document: There are two options to attach file

Option 1

<BodyPart filePath="" content-type="text/plain" charset="utf-8" content-id="" content-disposition="" multipart-type="">
<!--optional - each body part tag contains a part of the mail body, be it a plain text, html text or attached file.-->


Provide the path and file name of the body part, for example, C:\\images\\sunset.jpg.

Option 2

<attachment doc="/<path>" pltype="<type>"/>

  • You can add one or several attachments to the e-mail each in an <attachment> tag. If you want to add an attachment to the e-mail, provide the path to the location where the attachment is stored and the file name. This can be a path in the BizStore or a pointer to the output of a previous transformation atom, or a path in the file system.
  • You can include plain text (txt, csv, and so on) in the <attachment> tag in the predecessor XFORM for the Send Email atom. You can also include markup text as plain text. If you want to use attachments that do not strictly conform to the rules for an XML document, wrap them in CDATA sections such as in the example below:
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers