Subject: | Mail::Send::open broken for type 'smtp' |
The following script dies due to the failure of the Mail::Send::open
call. Reading the source code, the open method would appear to fail for
any type that doesn't have an exe.
sub mail
{
my ($to, $subject, $body) = @_;
use Mail::Send;
my $msg = Mail::Send->new();
$msg->to($to);
$msg->subject($subject);
my $fh = $msg->open('smtp', Server => 'mail', Debug => 1) or die
("Couldn't
open Mail::Send message");
print $fh $body;
$fh->close;
}
mail('user@example.com', 'mailtest', "body");