Striping hyperlink from inbound email

Brendan Hallida
Kilo Guru

Hi all,

I was looking at the ability to strip hyperlinks from the inbound emails coming through via email.

We use McAfee, and it encrypts the email hyperlinks and we end up with 1000 character comments when 100 may be needed.

Cheers,

Brendan

6 REPLIES 6

Thanks Michael and Chuck,



The string is not exactly 100 characters every time, it was just an example.   It is actually more like 600 for each hyperlink.



Just a question regarding the first line, what am I meant to add where you have 'YOUR TEXT'?



Sorry I am very new to this.



Also - the emails are attaching the embedded images found in signatures to the incident upon creation / update.   What is the best way to ensure that the embedded images are not uploaded?



Thanks


Hi Brendan,



Sorry for the confusion. YOUR TEXT was meant to be a place holder for text containing the hyperlink. If this script were used in an inbound email action, then the email.body would go there.



If the length is variable, then the RegEx pattern needs adjusting. It's pretty minor to do. Using sites like:



RegExr: Learn, Build, & Test RegEx



Can help.



As far as stripping attachments, I would be reluctant to do that it could inadvertently remove attachments you DO want (say an image of a broken phone.)