How to remove hyperlink in an email

Hi everyone, I have na email body with hyperlink on an email and I want to remove so that it can be a plain text:
image

In the email I want to remove the underline so that it can be a plain email with no line.

It’s output is like this after reading from outlook email body

and I want this whole part to not be there:


Please help.
It needs to search if there are any on the email body and remove it

@Anelisa_Bolosha1

Try this regex

<mailto:\S*>

System.Text.RegularExpressions.Regex.Replace(stringvar,"<mailto:\S*>","")

Cheers

You can try with Regex @Anelisa_Bolosha1

System.Text.RegularExpressions.Regex.Replace(youvariable,“<.*?>”,String.Empty)

image

Let me know if you are facing any errors

Hi Anelisa,

You can achieve this by using this e-mail body with IsBodyHTML property set to true:

“<a href=”“#”" style=““text-decoration: none; color:#000000"” name=”“myname”“>test@test.com”

The # sets a blank reference, so it might appear clickable, but you will remove the underline.
If you also need to make it not clickable, you will need to adjust the Outlook settings.

Regards,
Kardelen.

It worked thanks so much

1 Like

@Anelisa_Bolosha1

Awesoem…glad it help you

Happy Automation

Cheers

1 Like