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
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