Skip Headers
Oracle® Fusion Middleware User's Guide for Oracle B2B
11g Release 1 (11.1.1.7)

Part Number E10229-13
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

B Handling E-Mail Attachments

This appendix discusses how Oracle B2B handles payloads by using e-mail.

The appendix contains the following sections:

B.1 Sending Payload as an E-Mail Attachment

In the case of outbound messages, Oracle B2B allows you to send the payload as an e-mail attachment. To send the payload as an attachment, you need to configure the delivery channel by setting Send as attachment to true.

In the case of inbound messages, if the e-mail body is empty, and it has a part of an e-mail attachment, then the attachment part is be treated as the payload and accordingly processed by Oracle B2B.

The default e-mail body ignore size is 5 characters. If the e-mail body contains more than 5 characters, then the body is treated as a payload.

The default size to ignore can be configured using the following Oracle B2B server property in Oracle Fusion Middleware Control console:

b2b.DefaultBodySize=20 (otherwise, the default value is 5).

B.2 Sending Payload as E-Mail Body

In the case of outbound message processing, if you want to send the payload as the e-mail body, you can configure the delivery channel by setting Send as attachment false. In case of inbound, in this case, the e-mail body is be treated as the payload and is accordingly processed by Oracle B2B.

B.3 Sending Payload as E-Mail Body Along with an Attachment

In the case of outbound message processing, if you want to send the payload as an e-mail body along with an e-mail attachment, you need to configure the delivery channel by setting Send as attachment to false, and specifying the attachment in the Attachment header at the back-end application.

For example:

<?xml version="1.0" encoding="UTF-8"?>
<Attachments xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="AttachmentDescriptor.xsd" boundary="boundary----">
  <AttachmentPart>
     <Location>file:///tmp/oralogo_small.gif</Location>
     <Content-Type>
         <Top-Level-Type>image</Top-Level-Type>
         <Sub-Type>jpeg</Sub-Type>
     </Content-Type>
    <Content-Transfer-Encoding>BASE64</Content-Transfer-Encoding>
    <Content-ID/>
    <Content-Description>A GIF file</Content-Description>
</AttachmentPart>
</Attachments>

In the case of inbound, in this case, the e-mail body is treated as the payload, and the attachment is stored in the configured attachment directory. The attachment directory can be configured by setting the following Oracle B2B server property in the Oracle Fusion Middleware Control console:

b2b.attachments.dir=<directory_name>/

B.4 Sending Payload as E-Mail Body Along with Multiple Attachments

In the case of outbound message processing, if you want to send the payload as an e-mail body along with multiple e-mail attachments, you need to configure the delivery channel by setting Send as attachment to false, and specifying the attachment in the Attachment header at the back-end application.

<Attachments xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="AttachmentDescriptor.xsd" boundary="boundary----">
  <AttachmentPart>
     <Attachment>UjBsR09EbGhjZ0dTQUxNQUFBUUNBRU1tQ1p0dU1GUXhEUzhi</Attachment>
     <Content-Type>
        <Top-Level-Type>image</Top-Level-Type>
        <Sub-Type>jpeg</Sub-Type>
     </Content-Type>
     <Content-Transfer-Encoding>BASE64</Content-Transfer-Encoding>
     <Content-ID/>
     <Content-Description/>
  </AttachmentPart>
  <AttachmentPart>
      <Location>file:///tmp/SpreadSheet.xls</Location>
      <Content-Type>
        <Top-Level-Type>application</Top-Level-Type>
        <Sub-Type>vnd.ms-excel</Sub-Type>
      </Content-Type>
      <Content-Transfer-Encoding>BASE64</Content-Transfer-Encoding>
      <Content-ID>SpreadSheet-1</Content-ID>
      <Content-Description/>
  </AttachmentPart>
</Attachments>

In the case of inbound, in this case, the e-mail body is treated as the payload, and the attachments are stored in the configured attachment directory.