Send SMTP Mail Message - HTML body doesn't work with forward email

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 .

@Jay_Chacko
I faced once when I use gradient in HTML code it was not picking. Might be possible its not supporting HTML advanced properties.

1 Like

Only happening when I fill forward messaging field in send email , regular send email is fine

@Jay_Chacko did you check after upgrade/downgrade your package?

Ya couple down, i was already on 1.10 which is old, then all the way up to 1.18 , no luck.

We are also facing same issue, any new update on this?

Have you tried concatenating the existing body content with the new HTML you want to add at the top of it?

I had no solution for replying and forwarding with HTML in the body , even when using the classic 365 graph API for outlook. The only HTML that worked in the body for replies and forwards was when I used the latest 365 (non-classic) Outlook activities.

We are adding a new html body and forwarding the existing email which is in error

Which is why I suggested concatenating the new body with the old body.

i just tried with mine and still no luck with html, same html works with send email for both graph and SMTP. Forward and reply no luck. I tested like html+emailResult(0).body (graph api)