通过电子邮件访问网页
我的数据提供商允许我在手机上访问邮件,但不能访问互联网。 我正在考虑编写一个实用程序来通过电子邮件获取网页,以便我在旅行时可以在手机上查看网页。这个想法是在我的系统上运行一个服务(运行 Outlook 并连接到交换服务器),该服务等待以网址作为主题的“查询邮件”。该服务应该获取网页并回复 html 内容。
请建议我如何有效地实施这一点。有没有可用的实用程序具有相同的功能?
My data provider allows me to access mails on my phone, but not internet.
I am thinking of writing a utility to fetch a webpage through e-mail, so that I can get view webpages on my phone while I'm travelling. The idea is to have a service running on my system (running outlook and connected to exchange server)which waits for a 'query mail' which has the web address as subject. This service should fetch the webpage and reply with the html content.
Please suggest ways as to how I can implement this efficiently. Is there any utility available which does the same?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
使用系统 CDO dll 来实现相当简单。我已经有了一个工作原型,只需将邮件发送至 [email protected]您将收到带有嵌入式网页(如果主题中提供了 url)或附加网络存档(包含所有资源的 mht 文件)的答案(如果邮件正文中发送了 url)。
这是一个快速而肮脏的代码片段,您可以使用:
NetworkUtils.UrlExists 是一个小方法,它发送 HEAD,然后在失败时发送 GET 请求来确定内容的类型和编码。
It's rather simple to do using system CDO dll. I already has a working prototype, just drop a mail to [email protected] and you will receive an answer with embedded webpage (in case of url was provided in subject) or attached web archive (mht file with all resources included) in case of url sent in the mail's body.
Here is a quick and dirty code snippet you can play with:
NetworkUtils.UrlExists is a small method that send HEAD and then if it fail GET request to determine type and encoding of the content.
sourceforge 上有一个实用程序可以执行相同的操作: Web2Mail
There is a utility that does the same on sourceforge: Web2Mail
Instapaper 做了类似的事情 - 它将网页转换为简单的 HTML 以便阅读。也许不完全是您所需要的,但可能是一个很好的起点。
Instapaper does something similar - it converts web pages into simple HTML for reading. Maybe not exactly what you need, but possibly a good starting point.