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?
-
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.