Perl Mime::Lite question. Help please?

Discussion in 'Perl' started by Zev Steinhardt, Aug 24, 2004.

  1. 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 => '',
    To => '',
    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 <>' 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
    Zev Steinhardt, Aug 24, 2004
    #1
    1. Advertising

  2. Zev Steinhardt

    dan baker Guest

    (Zev Steinhardt) wrote in message news:<>...
    > 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
    dan baker, Sep 1, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John B. Kim

    MIME::Lite HTML message handling

    John B. Kim, Jan 18, 2004, in forum: Perl
    Replies:
    1
    Views:
    1,693
    Joe Smith
    Jan 19, 2004
  2. Aaron Brady

    SQL, lite lite lite

    Aaron Brady, Dec 29, 2008, in forum: Python
    Replies:
    15
    Views:
    736
    Aaron Brady
    Jan 1, 2009
  3. gsanuser

    MIME::Lite / Net::SMTP question

    gsanuser, Dec 10, 2003, in forum: Perl Misc
    Replies:
    1
    Views:
    303
    James Willmore
    Dec 10, 2003
  4. Replies:
    0
    Views:
    81
  5. Billy Patton

    MIME::Lite or /bin/mail help please

    Billy Patton, Nov 2, 2007, in forum: Perl Misc
    Replies:
    0
    Views:
    103
    Billy Patton
    Nov 2, 2007
Loading...

Share This Page