Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl my $sendmail = "/usr/bin/sendmail -t"; my $reply_to = "Reply-to: bozo\n"; my $subject = "Subject: Put the subject here\n"; my $to = "To: myself\@mydomain.com\n"; open(SENDMAIL, "|$sendmail") or die "Cannot open $sendmail: $!"; print SENDMAIL $to; print SENDMAIL $subject; print SENDMAIL "Content-type: text/plain\n\n"; print SENDMAIL `cat /the/file/i/want/to/send`; close(SENDMAIL);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: how to attach file in sendmail
by brian_d_foy (Abbot) on Feb 19, 2006 at 18:50 UTC | |
|
Re: how to attach file in sendmail
by ambrus (Abbot) on Feb 19, 2006 at 19:05 UTC | |
|
Re: how to attach file in sendmail
by stonecolddevin (Parson) on Feb 19, 2006 at 19:01 UTC | |
|
Re: how to attach file in sendmail
by hesco (Deacon) on Feb 20, 2006 at 09:04 UTC |