Ekanvitha9 has asked for the wisdom of the Perl Monks concerning the following question:
This is the code I'm using for windows.Please check it and give suggestions for the code in the ways of giving To & From address
use strict; use warnings; use Net::SMTP; $smtp = Net::SMTP->new('$my_host'); $mail_to='abc@gmail.com'; $smtp->mail($ENV{USER}); $smtp->to($mail_to); $smtp->data(); $smtp->datasend("To: $mail_to\n"); $smtp->datasend("\n"); $smtp->datasend("A simple test message\n"); $smtp->dataend(); $smtp->quit; print "Email sent successfully\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Email sending in Activeperl 5 on Windows
by NetWallah (Canon) on Jun 24, 2019 at 14:39 UTC | |
|
Re: Email sending in Activeperl 5 on Windows
by bliako (Abbot) on Jun 24, 2019 at 14:40 UTC |