We want to automate the sending email for test results. I have gone through the topic in help. BUt I dont know how will I automatically attach .mht files as they are saved when the test run is over. My motive to simply send an email of the test results automatically when the test run ends. Right now I send them manually using the "send Via email" feature.
My main concern is first of all how to create .mht files and pass them as an attachment
You need to use the SaveResultsAs method to export the test log to an MHT file. Please refer to the "Log.SaveResultsAs" help topic for additional information. Also, I recommend that you read the "Sending E-Mail From Scripts" help topic demonstrating how you can send message with attachments.