note 108402 rejected from function.mail by salathe

From: Date: Mon, 23 Apr 2012 21:27:22 +0000
Subject: note 108402 rejected from function.mail by salathe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-187312@lists.php.net to get a copy of this message
Note Submitter: momounnamed at hotmail dot com ---- i have a problem in my script it sends from smtp but the problem is the message is plain i cant change it into html please help me my code: <?php require_once "Mail.php"; $from = "momo <sender@example.com>"; $to = "Ramona Recipient <momounnamed@hotmail.com>"; $subject = "hay !"; $message = 'message'; $host = "ssl://smtp.gmail.com"; $port = "465"; $username = "email"; $password = "pas"; $headers = array ('From' => $from, 'To' => $to, 'Subject' => $subject); $smtp = Mail::factory('smtp', array ('host' => $host, 'port' => $port, 'auth' => true, 'username' => $username, 'password' => $password)); $mail = $smtp->send($to, $headers, $message); if (PEAR::isError($mail)) { echo("<p>" . $mail->getMessage() . "</p>"); } else { echo("<p>Message successfully sent!</p>"); } ?>

« previous php.notes (#187312) next »