Removing Auto Signature from Inbound Emails

Derek3
Kilo Expert

Hi,

We are looking to remove the auto signatures from incoming emails (from a certain Inbound Action).     I would like to use a system property to hold the auto signature, so its easy to amend if it changes.   I have the script below, but its not working.   Can anyone see what is wrong and/or point me in the right direction.   Property is our.email.our.autosignature.

Script

//Identify any Footer/Auto Signature standard text to be stripped from email.

var footerText = gs.getProperty(our.email.our.autosignature);

inc.addQuery('number', incNum);

inc.query();

if(inc.next()){

    inc.work_notes = email.body_text.replace(footerText, ' ');

                  inc.state = '9';

    inc.update();

}

Thanks

Derek

1 ACCEPTED SOLUTION

Anurag Tripathi
Mega Patron
Mega Patron

and property can be read like this



gs.getProperty('our.email.our.autosignature');


-Anurag

View solution in original post

6 REPLIES 6

Its working when the Signature has no line breaks.   However when we have spaces its failing



So this works fine



The information contained in this email message is intended only for the person or persons to whom it is addressed. Such information is confidential and privileged and no mistake in transmission is intended to waive or compromise such privilege.



However this doesn't



Ourcompany group email privacy & confidentiality notice:



The information contained in this email message is intended only for the person or persons to whom it is addressed. Such information is confidential and privileged and no mistake in transmission is intended to waive or compromise such privilege.


joeyleahy
Tera Contributor

Hi Derek,



Looks like a perfect solution but I'm having the same issue with the line breaks. Did you manage to find a fix for that?