in reply to Re: Mail::Sender trouble
in thread Mail::Sender trouble
#!/usr/gnu/bin/perl -w use Mail::Sender; $mail = "address.mail"; # flat file passed from another program if (-e $mail) { open (FILE,$mail); @mailf = <FILE>; close FILE; $addr = $mailf[0]; # assigning mail variables $subj = $mailf[1]; # in the order that they $from = $mailf[2]; # are in the file $body = $mailf[3]; $attach = $mailf[4]; print "$addr\n $subj\n $from\n $body\n $attach\n"; sender_mail($addr,$subj,$body,$attach); } } sub sender_mail { ref ($sender = new Mail::Sender ({ from => '$addr', smtp => 'my.mailhub.com'})) # have to + be carfull with the hostname. || die "Mail::Sender::Error, $!"; (ref ($sender->MailFile( {to =>"$addr", subject =>"$subj", msg =>"$body", file +=> "$attach"}))) }
Edit: chipmunk 2001-06-05
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Mail::Sender trouble
by bikeNomad (Priest) on Jun 06, 2001 at 00:11 UTC | |
by Dalin (Sexton) on Jun 06, 2001 at 00:14 UTC | |
by Dalin (Sexton) on Jun 06, 2001 at 00:27 UTC | |
by bikeNomad (Priest) on Jun 06, 2001 at 00:40 UTC | |
by Dalin (Sexton) on Jun 06, 2001 at 00:52 UTC |