Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- use warnings;
- use strict;
- #----------------------------------------------
- use Mail::Mailer qw(sendmail);
- #----------------------------------------------
- my $mail = Mail::Mailer->new('sendmail')
- or die "Couldn't create a mail object!\n";
- my $myself = $ENV{USER} . '@' . $ENV{HOST};
- my $mail_headers = {
- 'Content-Type' => 'text/plain',
- To => [ 'tuna@fish.net', $myself ],
- From => $ENV{USER} . '@sedition.com',
- Subject => "Testing, 1, 2, 5 -- 3, Sire!",
- };
- $mail->open( $mail_headers );
- $mail->print("This message has no body!\n",
- "Except this of course...");
- $mail->close();
- exit 0;
Add Comment
Please, Sign In to add comment