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.
21 lines
499 B
Raku
21 lines
499 B
Raku
use Net::SMTP;
|
|
|
|
print "Content-type:text/html\n\n";
|
|
|
|
my $relay="relay.demo.net";
|
|
my $smtp="Net::SMTP->new($relay);
|
|
|
|
die "Could not open connection: $!" if (! defined $smtp);
|
|
|
|
$smtp->mail("Bate");
|
|
$smtp->to("admin@demo.net");
|
|
$smtp->data();
|
|
$smtp->datasend("To: admin@demo.net\n");
|
|
$smtp->datasend("From: admin@demo.net\n");
|
|
$smtp->datasend("Subject: Test1");
|
|
$smtp->datasend("\n");
|
|
$smtp->datasend("This is a test ...\n");
|
|
$smtp->dataend();
|
|
$smtp->quit;
|
|
|
|
print "Completed ...\n"; |