Fog Creek Software
Discussion Board




How to fix HEADERS for sending mail in PHP Version

Currently there is a bug where headers are not being recorded properly.  To fix, edit MailUtil.php

Look for  (in 2 places)

$scontents = $data[2]->headers($data[1]) . "\n\n" . $data[2]->get();

change to

foreach($data[2]->headers($data[1]) as $k => $v)
    $headers .= $k . ": " . $v . "\n";
$headers .= "Date: " . emailtime() . "\n";
$scontents = $headers . "\n" . $data[2]->get();

Then add this function to the file:

function emailtime()
{
  return strftime("%a, %d %b %Y %T %Z", time());
}

This will appear in an update very soon (along with other bug fixes mentioned on the board).

Michael H. Pryor (fogcreek)
Monday, January 26, 2004

*  Recent Topics

*  Fog Creek Home