Send error message with HTML in SMTP email

I am sending SMTP email on every error encountered in site in Catch.
But at times error message has html like below which I want to send as is -

Cannot find the UI element corresponding to this selector:
<webctrl id='ctl00_cph_vcB_vc0_Sfv_InsertSaveButton' tag='INPUT' />

But I have selected ‘isBodyHTML’ as true, HTML content of error message is being skipped everytime. I just received below in email -

Cannot find the UI element corresponding to this selector:

How can I resolve this issue?

Regards,
Adoshi

Hi @adoshi ,

While giving Exception message, you can replace “<” with “(”.

For Example, vExceptionMsg=vExceptionMsg.replace(“<”,“(”).

So your Mail will contains the below text,

Cannot find the UI element corresponding to this selector:
`(webctrl id=‘ctl00_cph_vcB_vc0_Sfv_InsertSaveButton’ tag=‘INPUT’ /)

Thanks,
Sandhiya P`