Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^3: Encoding for MIME::Lite?

by clinton (Priest)
on Aug 23, 2007 at 19:35 UTC ( [id://634717]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Encoding for MIME::Lite?
in thread Encoding for MIME::Lite?

Here's the problem:
$msg->attach( Type => 'text/html', Data => encode_qp($email_html) );

You're encoding twice. MIME::Lite does that for you - there's no need to call encode_qp yourself.

Clint

Replies are listed 'Best First'.
Re^4: Encoding for MIME::Lite?
by Opally (Initiate) on Aug 23, 2007 at 20:02 UTC
    thanks, Clint!

    I've tried it with use MIME::QuotedPrint;, with Data => $email_html and with and without this line:
    $msg->attr('Encoding' => 'quoted-printable');
    and it still generates this error in both cases:
    A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) faile +d: webmaster@coreknowledge.org SMTP error from remote mail server after end of data: host mail.coreknowledge.org [216.12.92.18]: 500 Line too long


    any guidance you can offer would be AWESOME.

    My old, very deprecated mail-lib.pl never caused this particular problem. :-( but of course it never handled HTML multipart/alternative email, either.
    ---Opally
      I didn't say use MIME::QuotedPrint - I said drop the qp_encode. Set the Encoding to whatever you want as per the docs in MIME::Lite, and the module will handle the encoding for you.

      Clint

        hey, Clint, I'm sooo happy I can ask you about this...

        multipart/alternative cannot use quoted-printable encoding, per MIME::Lite error message I get when I try to do that. My problem is that our MS Exchange server sees a long string of text from my longer forms, >1000 chars, and rejects the email.

        I used to have this same problem with Zen Cart, and solved it by changed the encoding to quoted-printable, but I can't see how to do that with MIME::Lite, using multipart/alternative. The quoted-printable encoding is rejected.

        ---Opally

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://634717]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2024-04-20 03:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found