# Send the header. $smtp->datasend("To: email@address.com\n"); $smtp->datasend("From: email2@address.com\n"); $smtp->datasend("Subject: This is the subject"); $smtp->datasend("\n"); # Send the body. $smtp->datasend("This is a test"); $smtp->datasend(); $smtp->quit;