I have been using the SMTP email with an HTML table body for a couple of years now. Recently, my requirement changed to forwarding emails using the same SMTP send email functionality. However, I noticed that when I fill the forward email’s body with a mailMessage object, the HTML in the body doesn’t render properly. Strangely, when I remove the data from the forward mailMessage field, the HTML body works fine. I have verified that the isBodyHtml property is set correctly, and my HTML is valid since I can render it on any webpage. It seems like the forwarding message injection process is causing some issues with the HTML rendering. Has anyone else faced this issue before and found a resolution?
My Html -I have to use formatted text here instead of blockquote since blockquote will render HTML in the UiPath form. So, I’m pretty sure the HTML is good.
<table style='border-collapse: collapse;border: solid windowtext 1.0pt;table-layout: Auto;width: 100%;color:black;margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; color: #000000; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;'><th style='border-collapse: collapse;border: solid windowtext 1.0pt;background:#DDD9C4'>AccountNumber</th><th style='border-collapse: collapse;border: solid windowtext 1.0pt;background:#DDD9C4'>CerisFileNumber</th><th style='border-collapse: collapse;border: solid windowtext 1.0pt;background:#DDD9C4'>GroupID</th><th style='border-collapse: collapse;border: solid windowtext 1.0pt;background:#DDD9C4'>DateOnLetter</th><tr><td style='border-collapse: collapse;border: solid windowtext 1.0pt;color:black'>745600</td><td style='border-collapse: collapse;border: solid windowtext 1.0pt;color:black'>F423</td><td style='border-collapse: collapse;border: solid windowtext 1.0pt;color:black'>F488</td><td style='border-collapse: collapse;border: solid windowtext 1.0pt;color:black'>6/25/2023</td></tr></table>
PS. I use a component i created to generate this HTML from Datatable, why it’s large and looks complicated, but works regardless .