Skip to Content
avatar image
Former Member

Receiver mail adapter with dynamic mail ID

We have a requirement,We need to get the mail ID from the payload and send it to that particular mail ID. We are using file to Mail scenario and message should be sent as an attachment.

Mail ID is different in each message.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Nov 02, 2017 at 09:22 AM
    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Will this work without any extra setups? will the adapter take email ID directly from the payload?

  • Nov 03, 2017 at 07:55 AM

    Hi Bharat,

    Can you provide more details about the requirement. There are different points we need to consider while handling this scenario. I've worked on couple of similar requirements and I would suggest finalizing the requirement before deciding on the approach.

    You mentioned that source file has to be sent as an attachment. Is it an XML/Text attachment?

    Do you need mail body & attachment or only attachment? - If you need both body & attachment, there are 2 approaches. One is using mailpackage and other is java mapping. SAP recommends to use java mapping instead of mail package.

    https://blogs.sap.com/2016/03/10/stop-using-mail-package-simplify-your-mail-receiver-adapter-scenarios/

    If you are not comfortable with java mapping, you can still continue using mail package.

    What should be the attachment name? Is it static or dynamic like source file name has to be attachment name etc.?

    any other requirements like email subject etc.?

    Provide the complete requirement so that I can help you in achieving it.

    --Priyanka

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      I have used the above code and I have given the mail address as dummy, When I pass the actual mail ID to which we have to send the file in the payload.

      I am getting this error

      Transmitting the message to endpoint using connection File_http:// sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.af.sdk.xi.srt.BubbleException: Failed to call the endpoint [null "null"]; nested exception caused by: java.io.IOException: server not responding OK to RCPT TO; 501 Syntax error - Badly formatted address