daily pastebin goal
23%
SHARE
TWEET

Untitled

a guest Jul 18th, 2018 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top