由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Internet版 - 求一程序
相关主题
有什么SMTP能够用于发HOTMAIL的信?How to save hotmail/yahoo mails to HD?
请推荐一提供shell的空间商.[转载] .cnf file
Re: how to read chinese PDF files?//bow &bowYahooPOPs 的问题
cuteFTP的site list放在哪个file里?a question about printing html file
请教http header 的扩展问题DBX Files for OE5 (Win 98, 2nd Ed.)
Is Klez.H really the worst?A Question about Outlook
IIS的MAIL SERVER能不能做POP3 server?Yahoo Mail出问题了
Help needed to open .qes fileshow to read WebCompiler files?
相关话题的讨论汇总
话题: mail话题: file话题: liu话题: eof话题: print
进入Internet版参与讨论
1 (共1页)
i*****l
发帖数: 10
1
是否有牛人可赐一程序:
I want to send out emails to several different people with differnt names as
recipient.
EX: (in MS excel)
A B C
Last First Email
1 Liu Mary [email protected]
2 Liu Mery m*[email protected]
3 Liu Mory m*[email protected]
Once you click send, the message I wrote will be sent to addresses from column
C with the recipients from column B.
t******g
发帖数: 10390
2
我正好有一个用perl写的,可以在linux下用.
#!/usr/bin/perl
$mailprog='/usr/lib/sendmail -t';
#打开邮件列表文件.
open (FILE, "email.txt");
@file=;
close (FILE);
#分解邮件列表成名字和地址.
foreach $file_line(@file)
{ ($name, $emailaddress)=split(/\|/, $file_line);
&sendpass;
}
#发信
sub sendpass {
open (MAIL,"| $mailprog") || die "Mail system error";
print MAIL "to: $emailaddress";
print MAIL "Subject: 标题换成自己的\n";
print MAIL "From: xxx\@hotmail.com\n";
print MAIL < Dear $name:
这里是信的内容,不过注意一些特殊字符可能导致出错,比如@需要写成\@才可以.上面的@也一样处

【在 i*****l 的大作中提到】
: 是否有牛人可赐一程序:
: I want to send out emails to several different people with differnt names as
: recipient.
: EX: (in MS excel)
: A B C
: Last First Email
: 1 Liu Mary [email protected]
: 2 Liu Mery m*[email protected]
: 3 Liu Mory m*[email protected]
: Once you click send, the message I wrote will be sent to addresses from column

i*****l
发帖数: 10
3
So I created two files: list.pl and email.txt
For list.pl , I just copied whatever you wrote as following:
For email.txt , I just wrote two lines as you mentioned below:
Then I ran this under unix:
~~~~~~~~~~~~~~~~~~~~~~~How?
Then I got a message:
Can't find string terminator "EOF" anywhere before EOF at list.pl line 21.
What do I do now?
t******g
发帖数: 10390
4
我看了一下,可能是你的EOF(倒数第二行,}上面那一行),结尾的地方有个空格.
把这个空格删了,EOF标记才能被认出来.
这个是我们通过浏览器传递文件出的问题.
关于打印进度,你可以参考这个程序:
#!/usr/bin/perl
$mailprog='/usr/lib/sendmail -t';
$i=0;
#打开邮件列表文件.
open (FILE, "email.txt");
@file=;
close (FILE);
#分解邮件列表成名字和地址.
foreach $file_line(@file)
{ ($name, $emailaddress)=split(/\|/, $file_line);
&sendpass;
}
#发信
sub sendpass {
open (MAIL,"| $mailprog") || die "Mail system error";
print MAIL "to: $emailaddress";
print MAIL "Subject: 标题换成自己的\n";
print MAIL "From: xxx\@hotmail.com\
1 (共1页)
进入Internet版参与讨论
相关主题
how to read WebCompiler files?请教http header 的扩展问题
MS FrontPageIs Klez.H really the worst?
请大家推荐一个好的空间服务商.IIS的MAIL SERVER能不能做POP3 server?
[转载] 你们用什么软件backup outlook mail?Help needed to open .qes files
有什么SMTP能够用于发HOTMAIL的信?How to save hotmail/yahoo mails to HD?
请推荐一提供shell的空间商.[转载] .cnf file
Re: how to read chinese PDF files?//bow &bowYahooPOPs 的问题
cuteFTP的site list放在哪个file里?a question about printing html file
相关话题的讨论汇总
话题: mail话题: file话题: liu话题: eof话题: print