Save Mail Message body is empty

I had used the save mail message activity to save the email as a .eml file. However recently I moved this code from one sequence to another sequence. This is now placed after another save mail message step. However the recently moved one saves the email but with empty body.

I am using UiPath.Mail.Activities version 1.1.6562.21018 and there has been no change in the package off late.

Help is most appreciated!

Hi @yraykar

Could you provide an example of the faulty project? Please leave only the problematic sequence and activities and attach it here, if you can.

I am sorry that I cannot share the sequence as is however it is a simple save mail message activity with just a path to save and the email message (System.Net.Mail.MailMessage) in the properties.

Also to add the same code works fine in another project.


@yraykar check the scope of the variable you are giving in MailMessage, also check the variable of the FilePath. If it is on the one sequence or entire flow?

The scope is fine as the same variable is used to save the email in a different step just before this step. The need is to save in two different file names. One step saves it fine in .mht file but next step is to save in .eml file. The step with .mht executes absolutely fine with same variable however not the .eml file.


Could you please share a screenshot of the “.eml” mail downloaded?

It is just blank. It contains the headers like “To”, “From”, “Subject” etc. but no content


After wondering for two days on the issue, I figured the problem with two successive save mail message activities. For some reason once the save mail message activity is used, I guess the end of body content is reached while reading and does not go back to the initial position. Because of this I guess the second file contains empty message. This looks like a bug in the activity but not sure how I could report it.

At the end after saving the mail once I retrieved the mail again using the get outlook mail message and saved again. This time it worked like a charm!


1 Like

Thank you for reporting back on the solution, we will definitely investigate it!

Feel free to also check out our most recent packages for the Mail activities. It might be that it is already fixed.