Send mail to customer which are in excel with attachment

Hi Guys,

I am having data in excel as below
image

I want to send mail to emials which are mentioned in excel with its respective attchments,

eg- abc@gmail.com email adress having 2 rows so respective files should get send in single mail to abc.

@amruta_pawar

looping Datatable → for-each row as row.
Use Send Outlook Email activity click → AttachFile → follow attach screen shot code.

Fill relevant data in To, Subject, Body as per your need.

:innocent:

1 Like

above approch will send mail one by one i want to send all files of abc to abc@gmail.com in one single mail.

Is there any way where we can add all the file paths into collection of same email adress, i need that if condition to iterate through this email adresses and check for same email adresses and the add respective files into collection.

Please help badly stuck here.

Hi,

Hope the following sample helps you.

Sample20200225-1.zip (14.9 KB)

Regards,

1 Like

@amruta_pawar

If you pass N no of file path in “Outlook Activity → AttachFile window”. It will be one mail with N attached files.

hi i am getting error as below while sending mail using SMTP,

image

Hi,

You don’t need to set Attachments property in Send SMTP Mail Message. Can you check if the property is empty? (And set variable at AttchmentsCollection property)

Regards,

thank you so much, it worked as expected., you saved me. :slight_smile:

1 Like

Hi buddy , is there any way we can update respective status of email id to “sent” i am having one more column as status in excel, can you please let me know what changes to do in xml which u sent?

Hi,

I’ll attach the modified sample. Hope this helps you.

Sample20200225-2.zip (17.2 KB)

Regards,

1 Like

thanks buddy for quick response. :slight_smile:

1 Like

Hi Buddy ,

Sorry for the continuous question , i am really bad at loops so your help can save me :stuck_out_tongue:,
Now i am having below scenario,
i am having 3 variables as beginning vale , ending value and balance from one for each row now if this value validation means beginning vale +ending value =balance if this is correct then only we have to send mail and update statuses, if validation fails then update another column of status as statement status in our dt to “Not Okay”, now how to handle this?

Hi,

Outline will be like the following image.

Regards,

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.