Perl Mime::Lite question. Help please?

Z

Zev Steinhardt

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 => '(e-mail address removed)',
To => '(e-mail address removed)',
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 <[email protected]>' 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
 
D

dan baker

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top