Help copying data from Excel to send SMTP mail

excel
email
activities

#1

I have just started using UiPath and have little experience as a programmer. I am hoping someone can be kind enough to give me some pointers on how I can filter email addresses from an Excel sheet and use those email addresses to send an SMTP or Outlook message to each of the email addresses that appear on the sheet. I am including a mockup example screen shot of the excel data that I would like to use,


I appreciate any assistance/guidance. Thanks,


#2

Your Filter Criteria?


#3

I am just wanting to grab any emails listed under column c and send a separate email to each of those addresses. The goal would be to include the body of the email advising that there were invalid login attempts to the “User Name” listed and provide the date the invalid attempts were performed.


#4

You could use the “Read Range” activity, then you can use all of the informations. For example: Using the “Read Range” activity you create a DataTable named “informations”, then you can access all data this way: Information.Rows(1).Item(2).ToString will return the element of the second line and third column (Remember the initial row is 0). Let me know this help.


#5

I’m sorry, I don’t understand how to input this information. Once I use the “Read Range” to create the DataTable named “information”. What process would I need to use to plug that data into sending as an SMTP email?


#6

Like this:

forum

I’m getting this warnings because i dont have the variables created.

You can also use the “For Each Row” activity to iterate over all the rows of the DataTable.


#7

Hey @oracle

Just for your Reference and understanding please find attached sample workflow and let me know in case of any doubts :slight_smile:

*here i have used “send outlook mail activity” to send mail so if you have an outlook account setup on your system then it will work for you and mention a valid email in sample excel as well.

you can use other send mail activities as well just fill required details :slight_smile:

Regarding Email template. just check the “IsBody” property to check and pass your html template to it :slight_smile:

Sample workflow - Oracle_sample.zip (8.5 KB)

Regards…!!
Aksh


#8

This worked EXACTLY as I wanted. Thank you SO much. Having this template to help with my understanding is so helpful to me.


#9

Thanks so much for your help. aksh1yadav has provided me a way to get this working through the outlook client. I appreciate all of the help you have both given me, both methods are working for me now. You guys rock!