为客户端的任何邮件客户端生成新邮件警报 [英] generate New mail alert for any mail client at client side

查看:67
本文介绍了为客户端的任何邮件客户端生成新邮件警报的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想为客户端的任何邮件客户端生成新邮件提醒

方。

我想查看是否有新邮件已经到达我的收件箱或

没有。邮件客户端是什么。我想为那些邮件做这件事

当新邮件发送时不提供任何桌面提醒。我将

登录我的电子邮件,然后激活javascript。它将定期



检索我的收件箱的文本内容并刷新页面,将其存储

in

。文本文件。我会定期执行此操作并覆盖文本

文件。

来自外部java程序我将检查此文本文件

如果发生任何变化,请定期查看

。假设

文件中的文本内容

表示邮件到达时间,更改,这意味着

发生了一些变化我的收件箱这意味着新邮件已经到了

,我将生成一个警报。我可以在我的浏览器中嵌入脚本

,例如歌剧。这可能吗?

你能建议任何代码吗?

谢谢。

问候

Hi,
I want to generate New mail alert for any mail client at client
side .
I want to check if any new mail has arrived in my inbox or
not . the mail client be anything . I want to do this for those mails
which don''t give any desktop alert when new mail arrievs . i will
login to my e-mail and then activate the javascript . it will
periodically
retrieve the text contents of my inbox and refresh the page , store it
in a
text file .I will do this action periodically and overwrite the text
file .
from an external java program i will check this text file
periodically to see
if any change has happened or not . suppose the text content in the
file
which indicate time of arrival of a mail , changes , that means that
some change has happened in my inbox . which means that new mail has
arrived
and I will generate an alert . I may embed the script in my browser
e.g. opera. Is this possible ?
Can you suggest any code for this ?
Thank you.
Regards

推荐答案

3月28日下午5:58,subhadip < subhadip ... @ gmail.comwrote:
On Mar 28, 5:58 pm, "subhadip" <subhadip...@gmail.comwrote:



我想为客户端的任何邮件客户端生成新邮件提醒

方。
Hi,
I want to generate New mail alert for any mail client at client
side .



如果您的邮件客户端可以使用javascript编写脚本,那么您可能可以(例如Apple的邮件客户端可编写脚本) AppleScript,但

与javascript非常不同。你肯定不能用

所有的邮件客户端。


你不能通过网页上的javascript来做,除非你的浏览器

提供了一个可编写脚本的API,可以与您邮件的另一个API进行通信

客户端(这种情况极不可能)。

-

Rob

If your mail client is scriptable with javascript, then you might be
able to (e.g. Apple''s Mail client is scriptable with AppleScript, but
that''s very different to javascript). You certainly can''t do it with
all mail clients.

You can''t do it from javascript in a web page unless your browser
provides a scriptable API that talks to another API to your mail
client (which is highly unlikely).
--
Rob


2007年3月28日00:58:31 -0700,subhadip < su ********* @ gmail.com>

写道:
On 28 Mar 2007 00:58:31 -0700, "subhadip" <su*********@gmail.com>
wrote:

>
我想为客户端的任何邮件客户端生成新的邮件提醒。
我想检查是否有任何新邮件已经到达我的收件箱或
。邮件客户端是什么。我想为那些邮件做这件事

当新邮件发送时不提供任何桌面提醒。我将登录我的电子邮件,然后激活javascript。它将定期检索收件箱中的文本内容并刷新页面,将其存储在

文本文件中。我会定期执行此操作并覆盖来自外部java程序的文本

我会定期查看这个文本文件,看看

是否发生了任何变化。假设
文件中的文本内容表示邮件的到达时间,更改,这意味着我的收件箱中发生了一些更改。这意味着新邮件已经到达
,我将生成一个警报。我可以在我的浏览器中嵌入脚本
歌剧。这可能吗?

你能建议任何代码吗?
>Hi,
I want to generate New mail alert for any mail client at client
side .
I want to check if any new mail has arrived in my inbox or
not . the mail client be anything . I want to do this for those mails
which don''t give any desktop alert when new mail arrievs . i will
login to my e-mail and then activate the javascript . it will
periodically
retrieve the text contents of my inbox and refresh the page , store it
in a
text file .I will do this action periodically and overwrite the text
file .
from an external java program i will check this text file
periodically to see
if any change has happened or not . suppose the text content in the
file
which indicate time of arrival of a mail , changes , that means that
some change has happened in my inbox . which means that new mail has
arrived
and I will generate an alert . I may embed the script in my browser
e.g. opera. Is this possible ?
Can you suggest any code for this ?



这是一个简单的Windows cmd.exe脚本我用来检查服务器上的邮件

使用* nix echo的Cygwin端口和netcat(nc)。


@C:\ cygwin \bin\echo -e用户名\pass密码\\\
list \ nnquit \ n | nc

pop3servername 110

当然,您必须指定echo的路径或将程序链接到

另一个名称,因为cmd.exe或Unix shell中的内置echo'

如bash不知道如何处理\ n。


你也可以在Perl中做这样的事情


#!/ usr / bin / perl -w

使用IO :: Socket;


Here''s a simple Windows cmd.exe script I use to check mail at a server
using the Cygwin ports of *nix echo and netcat (nc).

@C:\cygwin\bin\echo -e user name\pass password\nlist\nquit\n | nc
pop3servername 110

Of course, you have to specify the path of echo or link the program to
another name because the built-in echo''s in cmd.exe or a Unix shell
such as bash don''t know what to do with \n.

You could also do something like this in Perl

#!/usr/bin/perl -w
use IO::Socket;


remote = IO :: Socket :: INET-> new(

Proto =" tcp",

PeerAddr =" nameofpop3server",

PeerPort =" pop3(110)",



或die无法连接到你的pop3" ;;


print
remote = IO::Socket::INET->new(
Proto ="tcp",
PeerAddr ="nameofpop3server",
PeerPort ="pop3(110)",
)
or die "cannot connect to your pop3";

print


这篇关于为客户端的任何邮件客户端生成新邮件警报的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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