Emails sent from the excel sheet

I want to send mails to many people through outlook and the people list is from the excel sheet. How should I approach this ?

Hi @preksha_srivastava,

Read the excel file and store in datatable and from datatable you can access the names and store in send outlook email activity.

Refer the below workflow and the sample excel sheet with multiple email addresses.

In the sample excel file i have added only 2 email addresses you can add multiple email address by separating them using “;”

Queue (1).xaml (8.3 KB)

Sum.xlsx (8.3 KB)

Thanks

@preksha_srivastava

Is the above solution working for you.

1 Like

Hi,

I have 20 e-mail in my excel along with other columns.i need to send the same message to all 20 people

Hi,

Read the complete excel file store in the data table, use for each and use send outlook message and in To field of send outlook, use row(“column name”)

But I need to send only one mail

@preksha_srivastava,

  1. Read the complete excel file.
    2 . Use For each row in Datatable.
  2. Use Assign activity and append all the email addresses like below
    str = str+";"+row(“Column Name”).ToString
  3. you will have all email addresses in one variable.
  4. Use send outlook mail message and use the above str variable in TO field of send outlook mail message.
2 Likes

Hello @preksha_srivastava,

Please save all email id’s in single row like below snapshot and take a read cell activity.
Emails

OR

You can store those email id’s in text or xml file, read it and supply a variable to ‘To’ property of send outlook mail message activity.

Cheers,
Pankaj

1 Like

When I am doing this error is coming.
The error is:

System.NullReferenceException

Hi,

Which step you are getting the error.

To resolve exception I first assigned str = “”
Then the exception goes but my mails are not coming under one msg

Hey @preksha_srivastava

Find below Reference Sample: - Multiple_Rec_MailSendSample.xaml (9.1 KB)

Letme know in case you still have some doubts or problem.

Regards…!!
Aksh

2 Likes

How to take all the emails in one row

Hi @preksha_srivastava,

Refer the below workflow, for the below excel file.

Sequence3.xaml (9.1 KB)Sum.xlsx (8.3 KB)

Please have a look on attached file,
SendMail.xaml (13.4 KB)

Thanks

If I need to show current month in string not as integer.
Then what should I do.

Currently I am using now.month

please use below code,

String strMonth = DateTime.Now.ToString(“MMMM”) - will show you March, if you take out one M then it will appear as Mar.