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:
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
Anil_G
(Anil Gorthi)
April 1, 2024, 7:19pm
2
@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)
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.