Is there any way to force Mail::Send to accept a "From" name, as opposed to
simply sending and using the hostname by default? I don't see anything in
the docs about setting the "From" field in the headers.
(of course, I can just open a pipe to sendmail, but I want to see if there's
a way to pull this off first...)

example:

#!/usr/bin/perl -w

require Mail::Send;

my $mailbody = "blah blah blah";
my $to = '[EMAIL PROTECTED]';
my $from = '[EMAIL PROTECTED]';

my $msg = new Mail::Send;

# $msg->from($from) # doesn't work and mail
                    # doesn't get sent if you
                    # use it

$msg->to($to);
$msg->subject('Mail from SomeBusiness.com');
my $fh = $msg->open;
print $fh $mailbody;
$fh->close;

# When this mail comes in, it comes from
# <mywebaccountuserID>@<mywebhostdomain>


-----
Scot Robnett
inSite Internet Solutions
[EMAIL PROTECTED]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to