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";
In reply to Email sending in Activeperl 5 on Windows by Ekanvitha9
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |