Send SMTP Mail Message: Illegal characters in path

Hi All,

I trying to send the SMTP mail through UiPath. The activities is initially placed under excel scope. Later, i have moved out of excel scope and declared the variable to add the html file into mailbox to send. I am getting some issue on the mail sending part.

Send SMTP Mail Message: Illegal characters in path.

I checked many times on the illegal characters in path.

Responses are really does matter to fix this issue :slight_smile:

Janarthanan A


Check IsBodyhtml is enabled in the activity properties

Also if you are passing any attachment, check the filename contains any special characters which are not allowed in File Naming

Mark as solution if this helps


Hi @Janarthan_0310,

This error will occur when you are using forbidden characters in a filepath. This includes symbols \ / : * ? " < > and |

Are you attaching a file with any of those characters?

Earlier, i have trying to attach the file which name contains : in filename and now i have tried to use space in the filename. For ex:- 2020 07 16 is the file name with html format.

Hi @Janarthan_0310,

That sounds like the cause of your issue. Give the filepath as a standard variable, like FilepathVar or Config.Rows(x).Item(y).ToString