Click here to get back home

Perl Mime::Lite question. Help please?

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Perl Mime::Lite question. Help please? Zev Steinhardt 08-24-2004
Get Chitika Premium
Posted by Zev Steinhardt on August 24, 2004, 8:45 am
Please log in for more thread options
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 => 'me@mymail.com',
                        To => 'someone@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');


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


Posted by Bill Karwin on August 24, 2004, 1:43 pm
Please log in for more thread options
Zev Steinhardt wrote:
> 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?

Hmm... it worked for me in a quick test. That is, I formatted the
"From" just like you describe, and I received the email in my inbox, and
did not get a bounce-back error.
I'm using MIME::Lite 3.01, which version are you using?

Bill K.


Posted by Zev Steinhardt on August 25, 2004, 7:05 am
Please log in for more thread options
> Zev Steinhardt wrote:
> > 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?
>
> Hmm... it worked for me in a quick test. That is, I formatted the
> "From" just like you describe, and I received the email in my inbox, and
> did not get a bounce-back error.
> I'm using MIME::Lite 3.01, which version are you using?
>
> Bill K.

Bill,

Thanks for the response. I'm also using 3.01. I'm also on a Windows
system using ActiveState's implementation of Perl (if that helps...)

Zev Steinhardt


Posted by dan baker on September 1, 2004, 1:45 pm
Please log in for more thread options
WayneS1068@yahoo.com (Zev Steinhardt) wrote in message
> 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


Similar ThreadsPosted
How to log the output of Mime::Lite ? June 26, 2006, 6:52 pm
MIME::Lite need sendmail Queue ID November 16, 2006, 9:34 am
Having trouble installing MIME::Lite module July 6, 2006, 4:25 pm
[MIME::Lite] not recognizing carriage-returns in body of message August 18, 2005, 5:06 pm
Perl Module for S/MIME October 19, 2006, 1:58 am
Perl Module for S/MIME October 19, 2006, 1:59 am
SOAP::Lite : Problem of # sign added by SOAP::Lite in the sent SOAPActionstring November 5, 2004, 8:45 pm
Perl Expect question November 8, 2004, 12:20 pm
Perl Related Question November 15, 2005, 7:43 am
General question on CPAN perl modules March 13, 2005, 6:34 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap