解析电子邮件的标准模块? [英] Standard module for parsing emails?

查看:56
本文介绍了解析电子邮件的标准模块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有用于解析电子邮件的标准库,可以应对电子邮件客户引用的不同方式?

Is there a standard library for parsing emails that can cope with the
different way email clients quote?

推荐答案

Phillip B Oldham写道:
Phillip B Oldham wrote:

是否有用于解析电子邮件的标准库,可以应对电子邮件客户引用的不同方式?
Is there a standard library for parsing emails that can cope with the
different way email clients quote?



AFAIK没有 - 不幸的是,这是用户可以配置的东西,而且b $ b因此没有任何暴行是不可想象的。很难写出一个模块...


所有你可以尝试的是应用一个启发式的如果有所有行

包含非字母数字字符的特定前缀。

但是如果用户配置使用


XX


你注定要失败......


Diez

AFAIK not - as unfortunately that''s something the user can configure, and
thus no atrocity is unimaginable. Hard to write a module for that...

All you can try is to apply a heuristic like "if there are lines all
starting with a certain prefix that contains non-alphanumeric characters".
But then if the user configures to quote using

XX

you''re doomed...

Diez


Phillip B Oldham< ph ****** ****** @gmail.comwrites:
Phillip B Oldham <ph************@gmail.comwrites:

是否有用于解析电子邮件的标准库,可以用不同的方式处理

邮件客户报价?
Is there a standard library for parsing emails that can cope with
the different way email clients quote?



应对凭什么?即,这样的
库的行为是什么?它会做什么?


另请注意,它不仅仅是邮件客户端进行报价;

经常组成邮件的用户将拥有很重要的是

报价材料是如何出现的。


-

\ a ??时间过得像箭一样。果蝇像香蕉一样。 a ?? Groucho |

` \ Marx |

_o__)|

Ben Finney

"Cope with" in what sense? i.e., what would the behaviour of such a
library be? What would it do?

Note also that it''s not merely the mail client that does the quoting;
frequently the user composing the message will have a heavy hand in
how the quoted material appears.

--
\ a??Time flies like an arrow. Fruit flies like a banana.a?? a??Groucho |
`\ Marx |
_o__) |
Ben Finney

Phillip B Oldham schrieb:
Phillip B Oldham schrieb:

是否有用于解析电子邮件的标准库,可以应对电子邮件客户端的不同方式

引用?
Is there a standard library for parsing emails that can cope with the
different way email clients quote?



你对引用是什么意思在这里?

1.将utf8 / latin1编码为ascii

2.引用文字的前缀,如我邮件上面的文字


Thomas

-

Thomas Guettler, http://www.thomas-guettler.de/

电子邮件:guettli(*)thomas-guettler + de

What do you mean with "quote" here?
1. Encode utf8/latin1 to ascii
2. Prefix of quoted text like your text above in my mail

Thomas
--
Thomas Guettler, http://www.thomas-guettler.de/
E-Mail: guettli (*) thomas-guettler + de

这篇关于解析电子邮件的标准模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆