How to save Save email attachments and email body in one folder?

I need to save each and every email attachments in one folder. Also need to save the email body in that folder too. Please help me in this.
I can able to save the attachments in one folder but cant able to save the email body(.txt or .html file) in that particular folder. If I try to save the email body using “save mail message” activity, it is saved in .txt file but the content inside it was something like codes.

Please help me in this.

Save the e-mail as a *.MHT file type

3 Likes

Thanks. its working

I only know because im pretty much doing exactly the same thing at the moment :slight_smile:

Great. Carry on.

I trying to save the email body for one particular client using “Save mail Message”. I have 20 mails from that client and I need to have separate 20 email body files but It creates just only one email body file.

My VB: “C:\Users\kmladmin\Desktop\NJIU”+mail.From.DisplayName+“.MHT”

For Example the Display name is “CDS”. It creates just only one file CDS.MHT. But I need file names like CDS 1, CDS 2,… like so on till CDS 20. So that I have separate email body for every mails.

Please help me in this.

I take it you have a for each loop to go through the mails?

If so create an assign counter = 1 outside of the for each

within the “C:\Users\kmladmin\Desktop\NJIU”+mail.From.DisplayName+Counter+“.MHT”

then at the bottom of the body of the for each increment the counter by 1 using Assign Counter = Counter + 1

This should save each mail as mail1 mail2 mail3 etc


Main.xaml (7.7 KB)

You are great. Thanks a lot.