cancel
Showing results for 
Search instead for 
Did you mean: 

How to handle multiple responses in Receiver Mail adapter?

Former Member
0 Kudos

Hello,

I have a scenario where I get n number of responses which has to be sent as an email.

My response looks like this -

   <Response>

      <Status/>

      <Text>TEST 1</Text>

   </Response>

   <Response>

      <Status/>

      <Text>TEST 2</Text>

   </Response>

Please let me know if there is any way to send this response as email.

Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

ambrish_mishra
Active Contributor
0 Kudos

Hi,

Are you looking to send multiple responses in the source to a single mail or as multiple mails. If yes, what Amit suggested should work. You can alternatively use a UDF to append the source strings.

If you are looking to send separate mails, then it is a different question.

Ambrish

Former Member
0 Kudos

I'm looking forward to send one email with all the responses.

Former Member
0 Kudos

I have to send few messages in the mail body say

hi,

this is to <<>>>

thanks

along with the response messages.

iaki_vila
Active Contributor
0 Kudos

Hi Sathis,

Are you talking about to send an email to multiple recipients?. If im right you can check this thread

Regards.

Former Member
0 Kudos

No. The response messages I get from source has to be compressed under content of the Mail message. How to compress these n number of responses?

Former Member
0 Kudos

Hello,

I think, u can use Return as XML functionality and try to send ur response message as a XML string under the "content" field of the mail package.

Thanks

Amit Srivastava

Former Member
0 Kudos

Thanks Amit,

Could you please explain me?

Former Member
0 Kudos

Hello,

Check below mapping and change it as per ur source (response) and target (content) fields.

Note - In below mapping i have used return as xml functionality on Record node, u have to use the same on ur source field.

After implementing above mapping, just execute ur E2E scenario and check how content is getting generated in ur mail?

Thanks

Amit Srivastava

Former Member
0 Kudos

Nope this does not work as the target will have the content as 0...1 and not un bounded.

Former Member
0 Kudos

>>Nope this does not work as the target will have the content as 0...1 and not un bounded.

What do u mean by that and why are u looking at the cardinalities?

The screenshot which i have provided u is just an example, so first try to implement it and then reach to a conclusion.

Former Member
0 Kudos

Oh okay. My MM does not work fine. I do not see any value in the content.

Former Member
0 Kudos

Hello,

Did u selected "Return as XML" on Record node while doing mapping?

Thanks

Amit Srivastava