How to Catch a Hyperlinked Image with Email Reply Separator?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2024 02:31 PM
Hello!
We have an automated company signature that appends to all emails sent outside the company. Since our ServiceNow instance email address is technically an external address, this signature gets applied to all user emails sending/replying to our instances.
Our company decided to start the signature block with a hyperlinked image. I can't figure out how to tell ServiceNow to discard all of the useless text where this is found.
After the emails are processed, the comments (e.g., in an Incident) show this where the image would otherwise be:
[email_sig_logo]<[some company URL here]>
The HTML in the email Body shows this at this at the same spot:
<a href="[some company URL here]" target="_blank" rel="noopener" data-saferedirecturl="[some other URL here]"><img src="[image source address]" alt="email_sig_logo" height="61" border="0"></a>
So far I have only tried using the post-processed string, but that doesn't seem to do it. I have read on stack exchange that using RegEx to parse HTML will be problematic, and I don't know RegEx well enough to try it.
Anyone else solve for this sort of thing, or know how I might go about doing it myself?
Thank you in advance!