构建通过 pop3 拉取 emai 的 Web 邮件客户端时存在哪些类型的编码/图像/格式问题
在构建通过 pop3 提取 emai 的 Web 邮件客户端时,存在哪些类型的编码/图像/格式问题?
我能想到的一些事情我知道我必须处理:
- 附件
- 内嵌图像
- html 电子邮件
还有哪些其他可能令人头痛的问题?
What sort of encoding/image/formatting issues are there when building a web mail client that pulls emai via pop3?
Some things i can think of that I know I will have to handle:
- attachments
- inline images
- html emails
What other possible headaches are there?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这是一项相当大量的工作,并且已经有很多解决方案 - 但这不应该阻止您!您的三点几乎涵盖了一般情况下的所有内容...事实是通过 POP3 传递的事实并不那么相关,IMAP,甚至 OWS(Outlook Web Services for Exchange)都需要注意以下几点:
基本上,您必须精通多种交易才能生成和解码电子邮件。
It's quite a lot of work, and there are already a lot of solutions out there - but that shouldn't deter you! Your three points cover almost everything in general terms... the fact it's coming through POP3 isn't all that relevant, IMAP, or even OWS (Outlook Web Services for Exchange) all require attention to the following points:
Basically you have to be jack of a number of trades to generate and decode emails.
许多 !
我强烈建议您阅读 pop3 rfc 作为入门。
http://www.faqs.org/rfcs/rfc1939.html
您可以下载很少有开源项目可以看看他们是如何实现 rfc 的。
Many !
I highly suggest you to read the pop3 rfc as a starter.
http://www.faqs.org/rfcs/rfc1939.html
You can download few open source projects to see how they implemented the rfc's.
我同意皮埃尔的观点,您应该阅读规范以充分了解幕后发生的事情。
我要补充的一件事是,我担心的关键事情是您正在阅读的邮箱和垃圾邮件的安全性。电子邮件通常包含对 javascript/图像的调用,可用于跟踪邮件是否已被打开。这是许多邮件客户端不显示图像的关键原因,除非您打开它们。
除了您使用的其他方法之外,您可能还必须确保解析消息并删除任何可能导致隐私问题的调用,除非发件人是可信的。
I agree with Pierre that you should read the specs to fully understand what's going on behind the scenes.
One thing I would add though is that the key thing I would be worried about is the security of the mailboxes you are reading and SPAM. Emails often contain calls to javascript/images that can be used to track whether the message has been opened. This is the key reason many mail client don't show images unless you turn them on.
Along with the other methods you are using you will probably have to make sure you parse the message and take out any calls that could potentially cause privacy issues unless the senders are trusted.