cancel
Showing results for 
Search instead for 
Did you mean: 

File to Mail Scenario

Former Member
0 Kudos

Hi everyone. I have a scenario where I need to pick up a jpeg file and send it to the mail adapter as an attachment to the email. I know that one of my options is to simply create an integration builder scenario that does not convert the file content and simply passes the data through xi to the mail adapter. This works but I cannot dynamically set the attachment name. I need to hard code the attachment name into the adapter module. I can create an adapter module that replaces the filename but we are having problems accessing the PI J2EE stack through the new NWDS 7.1(different issue).

So now I am trying to use the mail package to send the encrypted file to the mail adapter. I need to treat it as a binary file but I cannot enter binary data into the mail package XML. I need to convert the binary data to BASE64 and I have a java mapping program that does this. However, it sends the email out with the attachment as base64 and does not convert it back to binary.

Does anyone know how to tell the mail adapter to convert the data back to binary? The content type is already image/jpeg in the mail package.

I am also exploring the idea of creating the attachment dynamically in the java mapping program. This way the payload will have an attachment and I can select the keep attachments in the mail receiver but it does not allow me to create attachments in the java mapping program. It triggers an error in the framework:

<Trace level="1" type="System_Error">Error exception return from pipeline processing!</Trace>

<Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_TO_PERSIST" />

Any help is appreciated.

Thanks!

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Problem solved. It was just a problem in my InputStream.