note 79644 rejected from ref.mail by nlopess
| From: | nlopess@php.net | Date: | Thu, 06 Dec 2007 22:19:54 +0000 |
| Subject: | note 79644 rejected from ref.mail by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-132900@lists.php.net to get a copy of this message | ||
Note Submitter: deacil at cox dot net
----
Sorry to be a newbie but where do I make this change for godaddy?
require_once "Mail.php";
function emailHtml($from, $subject, $message, $to) {
$host = "localhost";
$username = "";
$password = "";
$headers = array ('MIME-Version' => "1.0", 'Content-type' =>
"text/html; charset=iso-8859-1;", 'From' => $from, 'To' => $to,
'Subject' => $subject);
$smtp = Mail::factory('smtp', array ('host' => $host, 'auth' =>
false));
$mail = $smtp->send($to, $headers, $message);
if (PEAR::isError($mail))
return 0;
else
return 1;
}
Thanks
John