Search code examples
emailoutlookexchange-serverabapsap-erp

Send a text in message body and not as an attachment


I'm sending the email message from ABAP-report of SAP ECC 6.0 EHP5 to Microsoft Exchange via SMTP. The message reaches user's inbox in Outlook 2013, but it arrives as an attachment instead to be in the body of the message. From the code's point of view, I'm sending the plain text, and I'm expecting to get it inside the message. Since I'm using the default ABAP-approach to sending emails, which sends text inside of an email body, I suppose that the root of the problem is in Exchange/Outlook side.

Is there any Exchange/Outlook setting, which explicitly directs to send the message as an attachment or inside of the message body?


Solution

  • In the examples given, the body is always typed HTM. For the mail body I always use type RAW and this works just fine (with Lotus Notes). So maybe you try the following when creating your mail body:

    document = cl_document_bcs=>create_document(  
                          i_type = 'RAW'  
                          i_text = im_text  
                          i_length = txt_len  
                          i_subject = im_subject ).