One of our customers is facing a problem in his code. It throws the error
Fatal error: Class 'Mail_mime' not found in /home/yashagn/public_html/mail_try1.php on line 9
Here is the code
<?php
error_reporting(E_ALL);
ini_set('display_errors', '1');
require_once 'Mail.php';
require_once('/usr/local/lib/php/Mail/mimePart.php');
$message = new Mail_mime();
$text = 'Hello this is the Plain email';
$html = '<b>Hello</b><hr />This is the HTML email.';
$message->setTXTBody($text);
$message->setHTMLBody($html);
$body = $message->get();
$extraheaders = array('From' => 'me@example.com',
'Subject' => 'Subject');
$headers = $message->headers($extraheaders);
$mail = Mail::factory('mail');
$mail->send('you@example.com', $headers, $body);
?>
Can anybody tell me what is wrong in the code?



LinkBack URL
About LinkBacks
Reply With Quote




