cancel
Showing results for 
Search instead for 
Did you mean: 

Mail receiver not creating attachment

Former Member
0 Kudos

Hello everyone,

I',ve been searching SCN to similar cases and can see some but can not find a solution for my problem, my scenario is:

SOAP -> SAP PI 7.4 AEX java only -> Mail

I'm trying to send an email with attachment following the blog:

Comm channel is Message Protocl as "XIPAYLOAD" with mail package checked, content encode as None and Keep attachments unchecked.

Mail package field "content type" with value multipart/mixed; boundary="--AaZz" , also tried multipart/mixed; boundary=--AaZz

Created a UDF to fill up "Content" field of mail package with the following code:

String CRLF = "\r\n";

String output = new String("");     

output = boundary + CRLF + "Content-Type: text/plain; charset=UTF-8" + CRLF + "Content-Disposition: inline" + CRLF + CRLF + body + CRLF + boundary + CRLF + "Content-Type: application/xml; name=" + filename + CRLF + "Content-Disposition: attachment; filename=" + filename + CRLF + CRLF + attachment + CRLF;     

return output;

as you can see is really simple. The email is actually sent but without attachment and in body is the whole content string as follows:

--AaZz

Content-Type: text/plain; charset=UTF-8

Content-Disposition: inline

Mail Body

--AaZz

Content-Type: application/xml; name=Test.txt

Content-Disposition: attachment; filename=Test.txt

Mail Body

Any ideas of what I'm doing wrong?, any comments are really appreciated.

Thanks in advance.

Regards,

Julio Cesar

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello everyone,

found the error, thanks.

Regards,

Julio Cesar

azharshaikh
Active Contributor
0 Kudos

Hi Julio,

What was the error and how did you resolve it

Regards,
Azhar