cancel
Showing results for 
Search instead for 
Did you mean: 

XI Receiver Mail Adapter converts linefeeds from CRLF to LF

thomas_huber
Explorer
0 Kudos

Hi,

i am currently working on a scenario in which i must send emails to different users providing a text body with an attachment. For this scenario i use mailpackage to send the emails.

To create a text body and an attachment i fill the mailpackage as followed

Mail:Content_Type -> multipart/mixed; boundary=simpleboundary

In the Mail:Content Field i put all the necessary MIME Headers using an UDF

--simpleboundary CRLF

Content-Type: text/plain CRLF

bodytext (is mapped from input message)

--simpleboundary CRLF

Content-Type: text/plain; name=name.txt CRLF

Content-Disposition: attachment; filename=name.txt CRLF

attachmentcont (is mapped from input message) CRLF

I did just the same as Stefan Gruber described in his [blog|https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/6321] [original link is broken] [original link is broken] [original link is broken]; (not in JAVA but in an UDF)

For the first look this works fine. You get an email with a body and an attachment.

But there is one big problem. I have traced the mail using tcpgateway and noticed that the mailadapter converts the CRLF (0d0a) within the Mail:Content field to simply 0A. This works on many Mailclients, but isn't RFC Compliant.

I have done a lot of debugging and can see in SXMB_MONI that the payload after the message-mapping still contains the 0D0A. So the problem is within the Mailadpater.

I have also tried to inculde the Sample Module CRLFfromToLF to the mail adapter with no effect.I also haven't found an according sap note.

I would highly appreciate any advice on this problem.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Did you ever find a solution for this - I have the exact same problem now.