use Net::SMTP; $smtp = Net::SMTP->new('smtp.hitech.com.my'); # connect to an SMTP server $smtp->mail( 'yng.sheng.toh@mybiz.net' ); # use the sender's address here $smtp->to('yng.sheng.toh@mybiz.net'); # recipient's address $smtp->data(); # Start the mail # Send the header. $smtp->datasend("To: yng.sheng.toh@mybiz.net\n"); $smtp->datasend("From: yng.sheng.toh@mybiz.net\n"); $smtp->datasend("\n"); # Send the body. $smtp->datasend("Hello, World!\n"); $smtp->dataend(); # Finish sending the mail $smtp->quit; # Close the SMTP connection