I'm sending emails with Mime::Lite using SMTP and I cannot find a way to use "Real Names" as shown below for my From field.
"Keith Boynton" <keithboynton@somewhere.com>
Should be perfectly valid?
Yet using Mime::Lite it doesn't work, I think where it actually falls over is in the function _addr in Net::Smtp which sticks <> around everything.
Has anyone successfully managed to send emails with this format, here is what I have tried:
It works perfectly for addresses without the "Real Name" part.
Any help would be greatly appreciated.....
"Keith Boynton" <keithboynton@somewhere.com>
Should be perfectly valid?
Yet using Mime::Lite it doesn't work, I think where it actually falls over is in the function _addr in Net::Smtp which sticks <> around everything.
Has anyone successfully managed to send emails with this format, here is what I have tried:
Code:
my $fromAddress="\"Keith Boynton\" <keithboynton\@somewhere.com>";
my $mime_msg = MIME::Lite->new(
From => $fromAddress,
To => $recipient,
"Reply-To" => $replyTo,
"CC" => $cc,
"BCC" => $bcc,
Subject => $subject,
Type => $mime_type
);
It works perfectly for addresses without the "Real Name" part.
Any help would be greatly appreciated.....