Dear all, I have the following:
#!/usr/bin/perl use strict; use warnings; use Mail::Sendmail; my $from = '"Test e-mails" <[EMAIL PROTECTED]>'; my $subject = 'Testing for survey e-mail'; open LIST, "<mailinglist" or die "Cannot open mailing list: $!"; open MESSAGE, "<mailinglist-message" or die "Cannot open mailing list message: $!"; my $message = <MESSAGE>; foreach (<LIST>) { my %mails = ( To => "$_", From => "$from", Subject => "$subject", Message => "$message", ); sendmail(%mails) or die $Mail::Sendmail::error; print "Message has been sent to $_"; }; close LIST; close MESSAGE; print "All e-mails sent successfully.\n\n"; 1. How can I get my whole email message into Message => 2. I think my filehanldes are messess, can you suggest anything? 3. my $message = <MESSAGE>; only gives the first line? Thanks, G. -- Just getting into the best language ever... Fancy a [EMAIL PROTECTED] or something on http://www.perl.me.uk Just ask!!! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>