I am using PEAR Mail to send an email through a remote email server. When I run the following code the email goes through successfully, but I get the following error: ******************************************************** Email sent successfully!PHP Notice: Only variable references should be returned by reference in C:\php\PEAR\pear\Mail\mime.php on line 375 PHP Notice: Only variable references should be returned by reference in C:\php\PEAR\pear\Mail\mime.php on line 593 How do I fix this? (PS: I have really no experience with PEAR and am amazed I got this far) ******************************************************** Thanks in advance, Here's my code: <?php require "Mail.php"; require "Mail/mime.php"; $from = "Test Email<autoemail@somedomain.com>"; $to="email1<email1@somedomain.com>"; $cc="email2<email2@somedomain.com>"; $subject="Sending e-mails from PEAR::Mail"; $headers=array('From'=>$from,'To'=>$to,'Cc'=>$cc,'Subject'=>$subject); $host = "mail.somedomain.com"; $username ="account@somedomain.com"; $password ="password"; $smtp = Mail::factory('smtp',array('host'=>$host,'auth'=>true,'username'=>$username,'password'=>$password)); $mime=new Mail_mime(); $txtBody = <<< BODY Hello, This is a test email sent from the PEAR::Mail Class. BODY; $mime->setTXTBody($txtBody); $htmlBody=<<< BODY <html><body> <h1>Hello,</h1><br> <br> This is a test email sent from the PEAR::Mail Class.<br> </body></html> BODY; $mime->setHTMLBody($htmlBody); $body = $mime->get(); $headers=$mime->headers($headers); $mail=$smtp->send($to,$headers,$body); // test file to send an email direct from the server echo "Email sent successfully!"; ?>