Send 10 outlook mails

How to send 10 outlook mails at a time with same subject in UiPath.How print that subject in ui path

Hi @anjani_priya

Use while loop to iterate for 10 times, inside while loop insert the Send outlook mail message activity to send mails with the same subject.

Hope it helps!!

Hi @anjani_priya ,
You can use subject created in config file, send multiple mail, you can check “to”
check recipient, if 10 different people,
we can add list recipient to a data table
for each row → send outlook with recipient is row(name).toString
with same subject, body,…

Hi @anjani_priya,

You can iterate over email ids and use Send Outlook Mail message or Send SMTP Mail message.

Please let me know, where/how email ids are stored?

Cant I use for each because i need to print the subject of the mails?If yes,How to use


Is your subject changing?

if so are you getting from excel?

you can use for loop as well or any loop to send emails

also if the email is same then you can add all emails ids in one activity and send to everyone as well


I have to send the mail to same person with same subject but 10 mails

Yes you can use for each @anjani_priya

Take an assign activity and create a Array of Int32 Variable and store 1 to 10 like a array.
Use for each activity to iterate the Array Variable, Inside for each insert the Send outlook Mail message activity.

Check the below image for better understanding.

Hope it helps!!


You can use for each activity if you have a list or array of mail ids to whom you want to send those emails

If yes
Then these are the steps

  1. Day you have array of string variable with values like {“”, “”…””} created in a assign activity

  2. Now use a FOR EACH activity where pass the above array as input and change the property - type argument as string

  3. Inside the loop you can use SEND MAIL activity and use item.ToString as your TO mail recipient and keep your subject (say u have saved that as a string variable named str_subject) in that mail activity

  4. If you want to print in UiPath studio like display in logs use LOG MESSAGE activity or writeline activity and pass the subject as a string
    or as a message box then use MESSAGE BOX activity

Let us know if u r looking for other methods

Its not working.I used while loop but its not working

Could be share you code once. @anjani_priya

outlooktask1.xaml (15.3 KB)
In mail message variable my outlook mail is present.

Sorry @anjani_priya It’s my mistake in the While condition make it like this Count<=10
Check the below once, modify the condition in the while activity.

Hope you understand!!

how to print subject to that 10 mails?

How i can print the subject of the 10 mails in message box?

if your in loop , you can use this for getting the subjects of each mail.

you can give this in message box : - DirectCast(currentItem,


cant we use currentitem.subject?


this way also we get the subject = DirectCast(currentItem,

and this way also by in the loop just = currentitem.subject?


I have to send mail and get the sub of the mail at a time.

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