#!/usr/bin/perl use lib 'path\to\lib'; use Mail::Mailer; $sender = 'sender@email.com'; $recipient = 'recipient@email.com'; $subject = 'test'; $message = 'test'; $smtp = new Mail::Mailer 'smtp', Server => localhost; $smtp->open({ From => $sender, To => $recipient, Subject => $subject}) or die "Can't open: $!\n"; print $smtp $message; $smtp->close(); print "Content-type: text/html\n\n"; print "hello world
\n";