blacksmith has asked for the wisdom of the Perl Monks concerning the following question:
'him@here.com','C:/test1.txt','C:/test2.txt','C:/test3.txt' 'her@there.com','C:/test3.txt' 'it@where.com','C:/test2.txt','C:/test1.txt'
#!c:/perl -w use Mail::Sender; my $time = localtime; my $subj_line = "Price Change Worksheet for $time"; my $work = 'me@work.com'; open(LIST, "c:/email.txt") or die $!; my @files; while(<LIST>) { s/^'//; s/'\n?$//; @files = split /','/, $_; my $email = shift @files; my $sender = new Mail::Sender( {smtp => 'mail.domain.com',from => $wor +k}) || die "$Mail::Sender::Error\n"; $sender->OpenMultipart( {to => $email, subject => $subj_line}); $sender->Body; $sender->SendLine('Here are the price change worksheets.'); $sender->SendFile( {description => 'Text File', encoding => 'Base64', file => @files}) and print "Mail was sent OK." || die "$Mail::Sender::Error\n"; $sender->Close; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Mail::Sender help
by suaveant (Parson) on Sep 11, 2001 at 21:09 UTC | |
by blacksmith (Hermit) on Sep 11, 2001 at 22:17 UTC | |
by blacksmith (Hermit) on Sep 11, 2001 at 22:41 UTC | |
by suaveant (Parson) on Sep 11, 2001 at 22:48 UTC | |
|
Re: Mail::Sender help
by drfrog (Deacon) on Sep 11, 2001 at 21:54 UTC | |
by Jenda (Abbot) on Mar 26, 2002 at 19:06 UTC |