[imp] Body incorporated into headers
Chris St. Pierre
stpierre at NebrWesleyan.edu
Wed Oct 11 11:17:09 PDT 2006
Problem solved. It was indeed an issue with the latest Mail_smtp PEAR
library; they take an array of headers and join() them, which leaves
no trailing \r\n, but then they only add one \r\n when sending the
data to the SMTP server. If anyone else has this problem, the patch
is as follows (be wary of word wrapping):
--- /usr/share/pear/Mail/smtp.php~ 2006-10-05 07:47:17.000000000 -0500
+++ /usr/share/pear/Mail/smtp.php 2006-10-11 13:14:54.000000000 -0500
@@ -288,7 +288,7 @@
}
/* Send the message's headers and the body as SMTP data. */
- if (PEAR::isError($res = $this->_smtp->data("$textHeaders\r\n$body"))) {
+ if (PEAR::isError($res = $this->_smtp->data("$textHeaders\r\n\r\n$body"))) {
$error = $this->_error('Failed to send data', $res);
$this->_smtp->rset();
return PEAR::raiseError($error,
PEAR_MAIL_SMTP_ERROR_DATA);
Chris St. Pierre
Unix Systems Administrator
Nebraska Wesleyan University
On Wed, 11 Oct 2006, Chris St. Pierre wrote:
>I've seen something strange lately where IMP (or PEAR?) fails to put a
>newline between the headers and body of a message. For instance,
>here are the last few headers of a real message:
>
>Content-Disposition: inline
>Content-Transfer-Encoding: quoted-printable
>User-Agent: Internet Messaging Program (IMP) H3 (4.1.3)
>9:30 Thursday would be great. Thanks, --Scott
>X-Virus-Scanned: ClamAV using ClamSMTP
>
>As you can see, the body of the email was incorporated into the
>headers.
>
>I'm not sure if this involves the PEAR libraries or not, but I'm using
>the latest versions of all of the PEAR stuff, including:
>
>Mail 1.1.13 stable
>Mail_Mime 1.3.1 stable
>
>Has anyone else seen anything like this?
>
>Chris St. Pierre
>Unix Systems Administrator
>Nebraska Wesleyan University
>
>--
>IMP mailing list - Join the hunt: http://horde.org/bounties/#imp
>Frequently Asked Questions: http://horde.org/faq/
>To unsubscribe, mail: imp-unsubscribe at lists.horde.org
>
More information about the imp
mailing list