 |
เพิ่งเขียน php ค่ะ พอเอาขึ้น server แล้วมีปัญหาค่ะช่วนหน่อยนะค่ะ Fatal error: Class 'Mail' Warning: include_once(Mail.php) failed to open stream: No such file or directory |
|
 |
|
|
 |
 |
|
ไฟล์ Mail.php หายไปไหนครับ
|
 |
 |
 |
 |
Date :
2012-02-26 09:11:21 |
By :
webmaster |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
น่าจะเป็น PEAR Mail::Factory ลองติดต่อผู้ให้บริการครับ
Code (PHP)
<?php
include('Mail.php');
/**
* Send mail using PEAR Mail Factory
*/
function drupal_mail_wrapper($mailkey, $to, $subject, $body, $from, $headers) {
$headers['From'] = $from;
$headers['To'] = $to;
$headers['Subject'] = $subject;
$params['host'] = ini_get('SMTP');
$smtp =& Mail::factory('smtp', $params);
$mail = $smtp->send($to, $headers, $body);
if ( PEAR::isError($mail) ) {
watchdog('debug', $mail->getMessage());
return false;
}
else {
watchdog('debug', 'Mail successfully sent!');
}
return true;
}
?>
หรือไม่ลองเปลี่ยนมาใช้แบบธรรมดา หรือ MIMEMAIL
Go to : PHP Sending Email / Send Mail
Go to : PHP Mail Class (MIMEMAIL V 1.5)
Go to : PHP Sending Email Using Gmail SMTP Account Authentication
|
 |
 |
 |
 |
Date :
2012-02-26 09:14:04 |
By :
webmaster |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|