Guest User

Untitled

a guest
Jul 18th, 2018
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. #!/usr/bin/perl
  2. use warnings;
  3. use strict;
  4. #----------------------------------------------
  5. use Mail::Mailer qw(sendmail);
  6. #----------------------------------------------
  7. my $mail = Mail::Mailer->new('sendmail')
  8. or die "Couldn't create a mail object!\n";
  9.  
  10. my $myself = $ENV{USER} . '@' . $ENV{HOST};
  11.  
  12. my $mail_headers = {
  13. 'Content-Type' => 'text/plain',
  14. To => [ 'tuna@fish.net', $myself ],
  15. From => $ENV{USER} . '@sedition.com',
  16. Subject => "Testing, 1, 2, 5 -- 3, Sire!",
  17. };
  18.  
  19. $mail->open( $mail_headers );
  20.  
  21. $mail->print("This message has no body!\n",
  22. "Except this of course...");
  23.  
  24. $mail->close();
  25.  
  26. exit 0;
Add Comment
Please, Sign In to add comment