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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.