njweatherman has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks, When using MIME:LITE to construct and send an email, how do I customize the From: part to include just my name instead of my email address? For instance,
$msg = MIME::Lite->new(
From =>'joesomebody@myhost.com',
To =>'you@yourhost.com',
Cc =>'some@other.com,some@more.com',
Subject =>'A message with 2 parts...',
Type =>'TEXT',
Data =>"Here's the GIF file you wanted"
);

This would show up in the receivers inbox as
From: joesomebody@myhost.com

I would like it to show up as
From: Joe Somebody

Replies are listed 'Best First'.
Re: MIME::LITE and the From Header
by GrandFather (Saint) on Dec 03, 2008 at 00:23 UTC
    From =>'Joe Somebody <joesomebody@myhost.com>',

    Perl's payment curve coincides with its learning curve.
Re: MIME::LITE and the From Header
by Your Mother (Archbishop) on Dec 03, 2008 at 00:30 UTC

    What GrandFather said, plus you have a couple of bad habits in there. You're apparently not using strict. Do it and warnings. Don't pass pre-formatted strings to an interface designed to accept data structures. Your "Cc" would be better as-

    Cc => [ 'some@other.com', 'some@more.com' ],

    Let MIME::Lite sort out the way to join them. Though it's not crucial here, it's just a better habit, in some kinds of data formats it becomes crucial, and the general approach will lend itself to easier hacking.