By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,230 Members | 2,471 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,230 IT Pros & Developers. It's quick & easy.

Perl Mime::Lite question. Help please?

P: n/a
I'm trying to use Mime::Lite to send out multipart messages. So far,
it all seems to work well except for one small part.

I want to display a "real name" along with the email address when I
send out the emails. Unfortuantely, whenever I do so, it gets bounced
by the program as an invalid email address.

For example, this works:

$msg = MIME::Lite->new(
From => 'm*@mymail.com',
To => 's******@hismail.com',
Subject => $subject,
Type =>'multipart/alternative'
);
### Attach a part... the make the message a multipart
automatically:
$msg->attach(Type =>'text/plain',
Data =>$text_letter
);

$msg->attach(Type =>'text/html',
Data =>$html_letter
);

MIME::Lite->send('smtp', $MAIL_RELAY, Timeout=>$MAIL_TIMEOUT) ||
die "Could not send mail!!";

$msg->send_by_smtp('my.mailrelay.com');
However, if I change the From line to 'Wayne <me@myaddress.com>' it
fails as a bad address. I've tried using send_by_sendmail as well as
send_by_smtp and am nearly at my wits end. Does anyone have any
ideas?

Thanking you in advance,

Zev Steinhardt
Jul 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Wa********@yahoo.com (Zev Steinhardt) wrote in message news:<41**************************@posting.google. com>...
I'm trying to use Mime::Lite to send out multipart messages. So far,
it all seems to work well except for one small part.

I want to display a "real name" along with the email address

---------------

Lite is very fussy about the format of the recipients.... try something like this:

$Recipient = "\"$RealName\"\<$email\>";

d
Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.