I am moving 100 mails per transaction suppose I have moved totally 897 mails, So how do I find this number that I have moved how many total number of mails? As I also need to send a mail notification to the team stating the total numbers of the mails moved.

# I am moving 100 mails per transaction suppose I have moved totally 897 mails, So how do I find this number that I have moved how many total number of mails?

get a count of the number of emails you move per transaction at state machine level, then increment it each time.

i.e.

First transaction:

arrMailMessage.Count = 100

NumEmailsMoved = 100

Second transaction

arrMailMessage.Count = 77

NumEmailsMoved = 177