安装 ActivePerl:
ActivePerl-5.8.8.819-MSWin32-x86-267479.msi
MD5是 2d09fad58588bf34a411b4f4018f951d
安装这个perl脚本所使用到的 包:
C:\Documents and Settings\vzhao2>ppm install Mail::Sender::Easy
Downloading ActiveState Package Repository packlist...not modified
Downloading Mail-Sender-Easy-v0.0.5...done
Downloading version-0.74...done
Downloading Mail-Sender-0.8.13...done
Unpacking Mail-Sender-Easy-v0.0.5...done
Unpacking version-0.74...done
Unpacking Mail-Sender-0.8.13...done
Generating HTML for Mail-Sender-Easy-v0.0.5...done
Generating HTML for version-0.74...done
Generating HTML for Mail-Sender-0.8.13...done
Installing to site area...done
14 files installed
然后使用附件中的perl 脚本, 注意发MAIL要求指定一个 MAIL服务器, 而登录这个服务器又需要一个用户名和密码, 脚本中可以写死, 也可以通过参数传递.
帮助:
usage: perl smtp_mail.pl options
options are:
--body=mail body text
--file=mailbody.txt file name
At most one of --body,--file
If none of above specified, mail body will be read from STDIN
If both specified, use --file
--subject=Mail Subject
--mailtolist="usr1@server.com; usr2@server.com"
Note: on unix, mail list separated by ; should be quoted
spaces before or after ; are allowed.
--attachment=data1.bin [--attachment=data2.bin]
this is optional.
--mail_from=should be valid to smtp login
--smtp_server=smtp server name
--smtp_port=25(default) only necessary when port is not 25
--smtp_user=login_name
--smtp_pwd=password
The above 4 parameters can also be set via environment variable:
SMTP_SERVER,SMTP_PORT,SMTP_USER, SMTP_PWD
For all the options, ':' can also be used in place of ':'
|
文件: | smtp_mail_cu.rar |
大小: | 1KB |
下载: | 下载 |
|
阅读(1853) | 评论(0) | 转发(0) |