The following code doesn't return any errors but I am not getting the email! What is my problem? How do I specify who $env{user} is? Do I say $user = from email address or do I say $envsh{user} = from email address? Below is the code:
use strict; use Net::SMTP; my $recipient1 = 'john@hotmail.com'; my $smtp = Net::SMTP->new('myhost.com' ); #$smtp->mail ($ENV{USER}); To: $recipient1; From: $ENV{USER}; Subject: "A Message"; "Test message to check my code"; $smtp->datasend(); $smtp->quit;
In reply to Re: Created script to send email but ending up with blank "FROM" field?
by edger1
in thread Created script to send email but ending up with blank "FROM" field?
by edger1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |