I want to retrieve the body of several emails according to the subject and with respect to the subject of each I would like to write a single email with all the bodies of the emails always according to the subject.
could you help me, I have already started but, how to add them in a datatable for example and then recover to make a single body
Thanks
Do you mean that you need a table with the mail body and categorize depending on the subject? And in the last step it will send X number of emails depending on subjects where the all the body text with the same category will be sent?
One way is to have 1 table for each category and append to the relevant table depending on the subject.
After the loop is done with all the emails then you could create the emails and output the relevant table to string and put it in the body.
Excel would be nice instead of have it in a body if there is a lot of data (many emails or much body information). The data will be more readable if attaching relevant excel file to the email instead of having it in the body. Just a suggestion.