ASP.NET:如何使用 POP3 下载电子邮件附件?
我正在建立一个电子邮件接收网站。我可以借助代码项目中使用的代码阅读电子邮件,但无法下载电子邮件附件。
谁能告诉我如何使用 POP3 下载电子邮件附件?
谢谢你!
I am building an email receiving website. I can read the email with the help of code used in Code Project, but I can't download email attachments.
Can anyone tell me how to download email attachments using POP3?
Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在我的一个项目中,我使用了一个商业服务器组件:aspNetPOP3。它处理“困难”的事情(MIME 的东西)。对我来说效果很好。使用该库保存附件非常容易,例如:
In one of my projects I used a commercial server component: aspNetPOP3. It does of the "difficult" things (MIME stuff). Works very well for me. Saving an attachment is very easy using that library, for example:
当您发送带有附件的电子邮件时,该文件会被编码为
base64
并包含在您的邮件中。因此,如果您已经收到电子邮件,那么您就已经收到了附件。现在只需对其进行解码即可。如果您可以提供有关您目前进展情况的更多详细信息,我们将提供更多信息来帮助您解决此问题。
When you send an email with an attachment, that file is encoded as
base64
and included into your message. So, if you already get your email message, you already got your attachment. Now it's just to decode it.If you can provide more details on how far did you get, we'll can provide more information to help you to solve this issue.