Skip to Content

How to get whole email (with attachment) as binary file

Hello experts,

I have requirement, when processing email, to save the email as attachment to sales order.

I need to save the whole email as file *.msg, like you can do from Outlook (fro message, then File -> Save As), then the message would be saved as file on local drive, which you can attach to the sales order in Services for Object (BDS).

I would like to add attachment by calling BAPI.

I can add attachment using this blog:

My problem is, that I dont see method that would return the whole email (with subject, body, attachments) as *.msg bytes variable. I can get Body, Subject, from and to, and attachments separately.

Could you please advise the way to achieve that? I would like to avoid using SAP GUI capture and stay with BAPIs only.

Thank you.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Aug 27 at 09:45 AM


    Unfortunately, there is no method in the Outlook library allowing the save of whole email.

    Please check the following documentation to find another method which can fits your needs:

    Best regards,

    Baptiste Saint-André

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.