Sending email with attachment to unique email ids

I want to send an email to these email id with attachment. It is working for me. But if the email Id is the same and attachment is different the bot has to send multiple attachments to that unique email id.
If you see the image, I want to send these attachments to the user in a single email.

Can anyone help me with this?

try this logic
row.Item(“ColumnB”) = “B”
replace row to coloumn when ever needed

You can use logic like below,
Assign email to a TempEmail Variable, and assign corresponding attachment file name to an array.
in a loop, Check Email is equal to TempEmail
if Equal continue adding the attachments to the array
if not equal, use array data to send multiple attachments, and save the new email address to TempEmail variable.

I am beginner to this, Can you please help me with sample of code?

In this way, How to get different attachment to send it to those email ids?

have a look on this xaml giving you some starter help:
akhilpadgilwar.xaml (10.4 KB)

Kindly note:
demo was done with some sample data. Integrating it into your xaml requires the modifications of variable names and column names according to you end implementation

@ppr Thanks for XAML. I will check and get back to you. Thanks for the efforts.

hava look on a more aligned to your flow demo:
akhilpadgilwar2.xaml (13.4 KB)

pay attention on:
here the prepared attachmentlist is used

showcasing on how general data is retrieved

Hi @ppr,

Thanks for your help. I am able to integrate in my project. The thing is I am not able to send the email using SMTP with tmp collection variable. There is some problem in SMTP collection. Ultimately I am not getting an email with multiple attachment.

Is ensured that the paths are valid?
For Detail Analysis i would recommend to do the rnd isolated with hardcoded values. IT allows you zu Focus on this issue only.

1 Like