How to use email reply separators?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-29-2024 05:28 AM
Hello, Team!
I've been searching but haven't found any information on how to use email reply separators [sys_email_reply_separator] in an email inbound action script. Can anyone provide guidance or examples on this?
Thanks in advance!
Best regards,
KK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-30-2024 04:43 AM
Hi @kkrushkov
Email reply separators in ServiceNow are used to identify and strip out quoted text, previous email threads, or signatures from incoming email messages.
I have provided all the information above but looks that's not clear, let me give the explanation of javascript code which earlier i have shared:
- EmailUtil Class: The EmailUtil class provides methods for handling email content, including stripping out quoted text based on the reply separators defined in the sys_email_reply_separator table.
- extractReplyText Method: This method extracts the new content from the email body, stripping out any quoted text or previous email threads based on the reply separators.
- Clean Body Processing: After extracting the clean body, the script processes it as needed. In this example, it creates a new incident with the clean email content.
How to Test:
- Create a Test Email: Send a test email to the ServiceNow instance that includes quoted replies or signatures.
- Trigger the Inbound Action: Ensure the inbound email action is triggered by the test email.
- Check the Logs: Verify the logs to ensure the extractReplyText method has stripped out the quoted text as expected.
- Review the Incident: If the action creates or updates an incident, review the incident to ensure the clean email body is correctly processed and stored.
I hope this will provide more clarification and helps to resolve your issue, if yes please mark my answer helpful and correct.
thank you
Rajesh chopade
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-14-2024 01:54 PM - edited ‎10-14-2024 01:55 PM
Can you please share the 'extractReplyText' method in the EmailUtil script include? I think that's what people are struggling with here. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-12-2025 06:38 AM
Hi @kkrushkov ,
did you find a solution for this? I have the same exact requirement and i'm stuck.
Regards,
Vishwa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Was this ever addressed?
The extractReplyText doesn't seem to exist in our OOB EmailUtil either.