invisible_ink has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl # # # use strict; use warnings; use lib '/usr/lib/perl5/site_perl/5.8.0/MIME'; use MIME::Lite; unless (@ARGV) { die "1"; } if ($ARGV[0] !~ /@.*?\..*?/) { die "1"; } my $to = $ARGV[0]; my $message; my $counter = 0; foreach my $inline (@ARGV) { if ($counter >= 1) $message += $inline . "\n"; ++$counter; } my $sendemail = MIME::Lite->new( From => 'me@whereiam.net', To => $to, Data => $message, Type => 'TEXT' ); $sendemail->send('smtp', 'valid.smtp.server') or die "1";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Passing an array, or not? MIME::Lite
by pg (Canon) on Oct 11, 2004 at 22:45 UTC | |
by invisible_ink (Initiate) on Oct 11, 2004 at 23:01 UTC | |
|
Re: Passing an array, or not? MIME::Lite
by kvale (Monsignor) on Oct 11, 2004 at 22:56 UTC |