note 108402 added to function.mail

From: Date: Mon, 23 Apr 2012 20:30:56 +0000
Subject: note 108402 added to function.mail
Groups: php.notes 
Request: Send a blank email to php-notes+get-187310@lists.php.net to get a copy of this message
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>"); } ?> ---- Server IP: 69.147.83.197 Probable Submitter: 41.234.130.118 ---- Manual Page -- http://www.php.net/manual/en/function.mail.php Edit -- https://master.php.net/note/edit/108402 Del: integrated -- https://master.php.net/note/delete/108402/integrated Del: useless -- https://master.php.net/note/delete/108402/useless Del: bad code -- https://master.php.net/note/delete/108402/bad+code Del: spam -- https://master.php.net/note/delete/108402/spam Del: non-english -- https://master.php.net/note/delete/108402/non-english Del: in docs -- https://master.php.net/note/delete/108402/in+docs Del: other reasons-- https://master.php.net/note/delete/108402 Reject -- https://master.php.net/note/reject/108402 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#187310) next »