Changing Mail Body Through Iteration

Hi, I am trying to send mail fetching names and emails from an excel sheet.
I am changing the email address with every iteration in for each row.
I also want to change the name in the mail body.
How can I do this directly in the body section of SMTP?
I am being able to change the name also if at first read it from a text file and replace the name during iteration in the txt file and then send that text file in the mail body.
But can the name also be changed during each iteration directly in the SMTP mail body section?

  1. Read the excel file and store it in DT
  2. Iterate it to send mail with txt file as attachment
  3. Send Mail activity will help to solve

From Excel data , we can able to get To Address of Mail
While framing a body change the name as per the input
Write the same body of content or new content as per your requirement for each row of data in Text file using Write Text File Activity.
Use above file as an attachment and send it in mail


Inside your For each iteration with send email activity with body part you can do something like this.

string.Format("Good Morning {0} on your email text body",row("<your_SenderName_variable>").ToString())



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