Sending mixed-type messages with PEAR::Mail_Mime

setTXTBody($text);
    $message->setHTMLBody($html);
    $body = $message->get();
    $extraheaders = array("From"=>"me@example.com", "Subject"=>"My Subject 7");
    $headers = $message->headers($extraheaders);

    $mail = Mail::factory("mail");
    $mail->send("best@friend.com", $headers, $body);
?>

Sending mixed-type messages with PEAR::Mail_Mime

It's only fair to share...Tweet about this on TwitterShare on FacebookEmail this to someoneShare on Google+
This entry was posted in PHP/MySQL and tagged , , , , . Bookmark the permalink.