in reply to Created script to send email but ending up with blank "FROM" field?
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;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Created script to send email but ending up with blank "FROM" field?
by iburrell (Chaplain) on Sep 17, 2004 at 21:36 UTC |