Revision: 39519
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at January 18, 2011 04:09 by kendsnyder
Initial Code
function sendHtmlEmail($recipient, $subject, $html) { // Need PEAR in include path with installed: Mail, Net_Smtp $headers = array( 'From' => 'whateveremail', 'Reply-To' => 'whateveremail', 'Cc' => 'whateveremail', 'MIME-Version' => '1.0', 'Content-Type' => 'text/html; charset=UTF-8', 'To' => $recipient, 'Subject' => $subject, ); $smtp = Mail::factory('smtp', array ( 'host' => 'smtp.server.whatever', 'port' => 25, 'auth' => true, 'username' => , 'password' => ) ); $mail = $smtp->send($recipient, $headers, $html); if (PEAR::isError($mail)) { trigger_error($mail->getMessage(), E_USER_WARNING); return false; } return true; }
Initial URL
Initial Description
Initial Title
Send SMTP emails with PEAR
Initial Tags
Initial Language
PHP