问题描述
我目前正在使用系统,允许用户回复发送的通知电子邮件( sigh )。
I'm currently working on a system that allows users to reply to notification emails that are sent out (sigh).
我需要删除回复和签名,以便我留下回复的实际内容,没有任何噪音。
I need to strip out the replies and signatures, so that I'm left with the actual content of the reply, without all the noise.
有没有人有任何关于
推荐答案
如果您的系统在内部和/或您的回复格式有限,有可能做一个很好的工作。以下是我们为trac门票电子邮件回复设置的过滤器:
If your system is in-house and/or you have a limited number of reply formats, it's possible to do a pretty good job. Here are the filters we have set up for email responses to trac tickets:
删除所有文本,包括:
- 等于
' - \\\
(标准电子邮件sig分隔符)的行
' - 行($ s code code)(人们经常忘记sig分隔符的空间;这不是sig以外)
- 以
开始的行-----原始消息-----'
(MS Outlook默认值) - 行以$ code>'________________________________ '(32下划线,再次显示Outlook)
- 以
开头的行开始'
并以结尾,写道:\\\
(OS X Mail.app默认)
' - 行以$
'From:'
(failafe four Outlook和其他一些回复格式)开始 - 以从我的iPhone发送
- 以
开头的行从我的BlackBerry发送' code>
- Lines that equal
'-- \n'
(standard email sig delimiter) - Lines that equal
'--\n'
(people often forget the space in sig delimiter; and this is not that common outside sigs) - Lines that begin with
'-----Original Message-----'
(MS Outlook default) - Lines that begin with
'________________________________
' (32 underscores, Outlook again) - Lines that begin with
'On '
and end with' wrote:\n'
(OS X Mail.app default) - Lines that begin with
'From: '
(failsafe four Outlook and some other reply formats) - Lines that begin with
'Sent from my iPhone'
- Lines that begin with
'Sent from my BlackBerry'
3号和4号是以...开头而不是等于,因为有时用户会将线条加在一起意外。
Numbers 3 and 4 are 'begin with' instead of 'equals' because sometimes users will squash lines together on accident.
我们试图对剥离回复更加自由,因为对于错误的文本而言,更为烦恼(对我们)有回复垃圾。
We try to be more liberal about stripping out replies, since it's much more of an annoyance (to us) have reply garbage than it is to correct missing text.
任何人都有其他要分享的格式?
Anybody have other formats from the wild that they want to share?
这篇关于剥离电子邮件的签名和回复的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!