Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
We moved our servers to rackspace, and those servers have plesk, which only uses qmail.

qmail appears to force bare LF checks, and we keep getting this error:

message transmission error (451 See http://pobox.com/~djb/docs/smtplf.html)

Here is the code, in part, we use to generate the email being sent:
my $_random_boundary = "NextPart_"; my @nums = ( 0 .. 9 ); my @chars = ( "A" .. "Z", "a" .. "z", 0 .. 9, qw() ); $_random_boundary .= join("", @nums[ map { rand @nums } ( 1 .. 3 ) ]); $_random_boundary .= "_" . join("", @nums[ map { rand @nums } ( 1 .. 4 + ) ]); $_random_boundary .= "_" . join("", @chars[ map { rand @chars } ( 1 .. + 8 ) ]); $_random_boundary .= '.' . join("", @chars[ map { rand @chars } ( 1 .. + 8 ) ]); my $__content_type = qq~multipart/alternative; boundary="----=$_random_boundary"~; my %mail = ( "To" => "$__to", "Subject" => "$__subject", "Content-Type" => $__content_type, ); my $_mail_Message = q~ This is a multi-part message in MIME format. ------=~ . $_random_boundary . q~ Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit ~ . $__text_message . q~ ------=~ . $_random_boundary . q~ Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable <html> <body> ~ . $__html_message . q~ </body> </html> ------=~ . $_random_boundary . q~-- ~;
That is some of the code, the main parts that the email uses...

My question is this... Is there a subroutine I can pass $_mail_Message to that will get rid of the bare LF and convert the bare LF into CR LF?

thx,
Richard

In reply to problem with 'bare LF' in script by powerhouse

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

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

    No recent polls found