PDA

View Full Version : ارور Could not execute: /var/qmail/bin/sendmail



mhabat
سه شنبه 30 مهر 1392, 14:48 عصر
سلام.
من از کلاس phpmailer استفاده می کنم. این ارور رو میده:

Could not execute: /var/qmail/bin/sendmail

mhabat
سه شنبه 30 مهر 1392, 15:01 عصر
سورس:


<?php
/**
* Simple example script using PHPMailer with exceptions enabled
* @package phpmailer
* @version $Id$
*/
require '../class.phpmailer.php';
try {
$mail = new PHPMailer(true); //New instance, with exceptions enabled
$body = file_get_contents('contents.html');
$body = preg_replace('/\\\\/','', $body); //Strip backslashes
$mail->IsSMTP(); // tell the class to use SMTP
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->Port = 465; // set the SMTP server port
$mail->Host = "mail.yahoo.com"; // SMTP server
$mail->Username = " "; // SMTP server username
$mail->Password = " "; // SMTP server password
$mail->IsSendmail(); // tell the class to use Sendmail
$mail->AddReplyTo(" @yahoo.com","First Last");
$mail->From = " @yahoo.com";
$mail->FromName = "First Last";
$to = " @yahoo.com";
$mail->AddAddress($to);
$mail->Subject = "First PHPMailer Message";
$mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
$mail->WordWrap = 80; // set word wrap
$mail->MsgHTML($body);
$mail->IsHTML(true); // send as HTML
$mail->Send();
echo 'Message has been sent.';
} catch (phpmailerException $e) {
echo $e->errorMessage();
}
?>

tmwebseo
چهارشنبه 01 آبان 1392, 18:56 عصر
دوست گلم اگر localhost کار میکنید جواب نمیده در ضمن ادرس to نیمه کاره است شاید از این باشه

mhabat
چهارشنبه 01 آبان 1392, 20:19 عصر
آقا یعنی هیچ راهی نداره با لوکال بتونم ایمیل ارسال کنم؟

MostafaEs3
چهارشنبه 01 آبان 1392, 22:56 عصر
//////////