#this script by Mario Mesiti m_mesiti@hotmail.com
#use it under Perl for Win32

use Win32::OLE;

sub sendmail {

	my($toName,$toAddress,$fromname,$fromaddress,$host,$subject,$message)=@_;

	$mailer=Win32::OLE->new("SMTPsvg.Mailer");
	$mailer->AddRecipient($toName,$toAddress);
	$mailer->{FromName}=$fromname;
	$mailer->{FromAddress}=$fromaddress;
 	$mailer->{RemoteHost}=$host;
	$mailer->{Subject}=$subject;
	$mailer->{BodyText}=$message;
	$mailer->SendMail();
	return $mailer->Response();
}

1;


    Source: geocities.com/robinchatterjee