Unable to read mails from the excel

Hi, I want to send a mails to multiple people but I want to read the email I’d from the excel and attach the attachment with each email id. I have done the workflow but it’s give error recepient mails not specified.
image
plz guide @Palaniyappan @RobertD @indra

1 Like

Hi
did the recipients name were mentioned in TO property buddy
make sure that the recipient names are separated with , comma symbol
Cheers @balkishan

1 Like

I given like this, bcz I want to read email I’d from the excel columns one by one and send to everyone. Right me if I am doing wrong.
image

check with the value of row(“Email ID”).ToString once with a write line activity buddy
before this smtp activity
Cheers @balkishan

1 Like

Yes, It’s not writing the value, I need to check it bro…

Fantastic
Check with the columnname once buddy
or if not mention the column index which usually starts from 0 for the first column
That should work for sure
@balkishan

1 Like

@balkishan Before passing to smtp activity print row(“Email ID”).ToString this value and check what value its getting.

1 Like

tried in both ways but not writing the valuve, but yes it’s fetching the complete data from the excel, I checked in the variable.


@indra

1 Like

can u share the xlsx file

1 Like

Fine no worries
–is Email ID is the first column
–kindly remove the break point at the keep the break point next to these activities and check buddy
–share a screenshot of the excel with that column if possible
Cheers @balkishan

1 Like

It’s not writing anything bro.

aaha
first row is empty buddy
use a if condition inside the for each row loop like NOT String.IsNullOrEmpty(row(“Email ID”).ToString)
and if the condition passes it will go to THEN part where we can have the current sequence of smtp or it will go to ELSE part where we can leave it simply empty

cheers @balkishan

1 Like

Oh so this is the reason. My data is written in the excel after 1st row. so how can I modified it start write from the 2nd row after headers.
image

Again I am reading this same excel to fetch the email address.

1 Like

well you can set the range in read range as “A3” which will start from A3 row, but we wont be able to access the headers, and we can mention only the column index in row(columnindex).ToString, if that is fine we can go for that
–or to be better read it fully with range as “” in read range and mention the condition like suggested above

That would work for sure buddy
Cheers @balkishan

1 Like

so I have to give this condition for every headers name bro. like ID, Email Add, Phone number…so on

yah wherever these columns values are used inside a for each row loop
Cheers @balkishan

1 Like

Okay I will do this changes.
can you please tell me bro. why it’s writing the data from A3 row.

As I attached the above screenshot…

From you are getting this data buddy
May be we need to look at that once

1 Like

see here bro. It’s start to write the data from A3.

what is the source of datatable DTable
where it comes from buddy

1 Like