I am trying to send email using Outlook Mail Message, but I ma getting the following error.
“The Specified String is not in the form required for the subject”
When I take the text specified for the subject in Message Box, it will show correctly, but while sending email it throws the error.
The Subject mentioned is :
SubjectLineHeader+" Error" +"-"+“Run Number: “+item.ToString
In Message Box, it shows like :”[Project RPA] Error- RunNumber: 1”
Here , if I remove the item.ToString from Subject line, then it works fine, but I need those dynamic variables in my Subject.
Can anyone please help if I am missing anything.