Skip to Content
author's profile photo Former Member
Former Member

How to send a file as mail attachment

Hello,

I have a xml message with three tags:

- receiver: email address of the destination

- subject: description of the message

- file: location of the file, containing directory and filename.

The file is a .pdf and is located on the XI server.

I want to sent the file as attachment via the mail adapter. Because the size of the file, I don't want to get the file through the IntegrationEngine.

Is there a simple, straightforward solution to let the Mail adapter pick up the file?

Thanks,

Peter

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 28, 2008 at 12:14 PM

    Hi Peter,

    refer to the following blog:

    [https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1798] [original link is broken] [original link is broken] [original link is broken];

    [https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1361] [original link is broken] [original link is broken] [original link is broken];

    Award points if useful

    Regards,

    Yashaswee.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 28, 2008 at 01:34 PM

    Hi,

    If u want toSend a Mail with Attachment

    If you want to send a mail with a body and attachment, or with several attachments, the

    message sender has to provide an XI message with additional attachments. For each

    additional payload of the XI message, the mail adapter creates an attachment for the

    mail. To enable this feature, you select the Keep Attachments checkbox when

    configuring the mail adapter. By default, the payload of the message is also sent as an attachment. If you do not want the payload to be sent as an attachment, set

    ContentDisposition to inline.

    If you want to give each attachment a certain name, you can use the swap module. The

    swap module changes the main payload.

    Enter the localejbs/AF_Modules/PayloadSwapBean module as Local

    Enterprise Bean between the two modules that change the attachment names.

    Select a value for Module Key. Use this module key to create the following two lines in

    the Module Configuration:

    swap.keyName payload-name

    swap.keyValue <Name of the Payload>

    You can find the name of the payload that you want to set as the main payload in the XI

    message monitor (SXMB_MONI).

    Regards,

    Phani

    Reward points if Helpful 😊

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hallo Phani,

      Thanks, but the point is, that the filecontent is not a part of the payload. The filename and location are given in the payload. I have to swap the file to the attachment.

      Regards,

      Peter

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.