You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
459 B
Perl

#!c:\perl\bin
use Net::SMTP;
print "Content-type: text/html \n\n";
$server = 'mail.mydomain.com';
$fromaddress = 'me@mydomain.com';
$toaddress = 'you@yourdomain.com';
$subject = "Test Example \n\n";
$message = "This is a test \n\n";
$smtp = Net::SMTP->new($server);
$smtp->mail($fromaddress);
$smtp->to($toaddress);
$smtp->data();
$smtp->datasend("Subject: $subject");
$smtp->datasend($message);
$smtp->dataend();
$smtp->quit();