davewylie 0 Newbie Poster

Hi,

Can anyone help me with this problem?

I have written some PHP code to send emails to a distribution list. The emails do get sent, but the subject box and to box are blank. However, To: and Subject appear at the top of the message, which just looks messy.
My code as follows:

include("Mail.php");
include('Mail/mime.php');
$smtp =& Mail::factory('smtp',
array ('host' => $host,
'auth' => true,
'username' => $username,
'password' => $password));
$headers['From'] = $from;
$headers['To'] = $to;
$headers['Subject'] = $subject;
$smtp->send($to, $headers, $message);

I am using Apache as the server, running on Windows. Any help would be much appreciated.