Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

XI Receiver Mail Adapter converts linefeeds from CRLF to LF

<body><p>Hi,</p><p></p><p>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.</p><p></p><p>To create a text body and an attachment i fill the mailpackage as followed</p><p> <em>Mail:Content_Type -> multipart/mixed; boundary=simpleboundary</em></p><p></p><p>In the Mail:Content Field i put all the necessary MIME Headers using an UDF </p><p> <em>--simpleboundary CRLF</em></p><p> <em>Content-Type: text/plain CRLF</em></p><p> <em>bodytext (is mapped from input message)</em></p><p> <em>--simpleboundary CRLF</em></p><p> <em>Content-Type: text/plain; name=name.txt CRLF</em></p><p> <em>Content-Disposition: attachment; filename=name.txt CRLF</em></p><p> <em>attachmentcont (is mapped from input message) CRLF</em></p><p></p><p>I did just the same as Stefan Gruber described in his &#91;blog| <b>[original link is broken]</b> <b>[original link is broken]</b> <b>[original link is broken]</b>; (not in JAVA but in an UDF) </p><p></p><p>For the first look this works fine. You get an email with a body and an attachment. </p><p></p><p>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.</p><p></p><p>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. </p><p></p><p>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.</p><p></p><p>I would highly appreciate any advice on this problem.</p></body>
Former Member
Not what you were looking for? View more on this topic or Ask a question