Okay. This is by no means a full script - you need to flush out
the headers so SPAM filters don't trash you.
#!/usr/local/bin/perl
use strict;
use warnings;
use Mail::Mailer;
my %headers = (
'To' => 'foo@bar.com',
'From' => 'bar@foo.com',
'Subject' => 'test'
);
my $body = "Test Test";
my $mailer = new Mail::Mailer 'sendmail';
$mailer->open(\%headers);
print $mailer $body;
Now was that so hard ... it's right out of the documentation. No free pass next time.
|