All pastes #490125 Raw Edit

Mine

public text v1 · immutable
·published 2007-05-15 21:19 UTC
rendered paste body
use strict;
use Getopt::Long;

my $email;
my $option = GetOptions ( "email=s" => $email );

my $from = "blah@blah.com";
my $subject = "HI HI HI";
my $body = "HI HI HI";

sub sendEmail
{
  my ( $to, $from, $subject, $message ) = @_;
  my $sendmail = '/usr/lib/sendmail';
  open(MAIL, "|$sendmail -oi -t");
  print MAIL "From: $from\n";
  print MAIL "To: $to\n";
  print MAIL "Subject: $subject\n\n";
  print MAIL "$message\n";
  close(MAIL);
}

sendEmail ( $email, $from, $subject, $body );