0
godaddy smtp에서 메일을 보낼 때 다음 오류가 발생합니다. 내가 오류 다음 얻고있다godaddy에서 phpmailer가 작동하지 않거나 mail()에서 작동하지 않습니다.
는 경고 : require_once를 (class.phpmailer.php는) function.require-번] : 파일 이름에 해당 파일 또는 디렉터리를 줄에 60
치명적인 오류 : 스트림을 열지 못했습니다 : require_once를() function.require] 실패 개방 요구 'class.phpmailer.php'(의 include_path = './usr/지방/php5_3/LIB/PHP')
<?php
if (isset($_POST['email']))
//if "email" is filled out, send email
{
//send email
require_once("class.phpmailer.php");
$mail = new PHPMailer();
//$mail->IsSMTP();
$mail->SMTPDebug = 1; // 1 tells it to display SMTP errors and messages, 0 turns off all errors and messages, 2 prints messages only.
$mail->SMTPAuth = true;
$mail->SMTPSecure = "https";
$mail->Host = "smtpout.asia.secureserver.net";
$mail->Port = 25;
$mail->Username = "[email protected]" ; // this is email on godaddy account
$mail->Password = "password";
$mail->From = "[email protected]" ;
$mail->FromName = "some name" ;
$mail->AddAddress($_POST['email'], $name);
//$mail->AddReplyTo(“Email Address HERE”, “Name HERE”); // Adds a “Reply-to” address. Un-comment this to use it.
$mail->Subject = "site no. ".$_POST['site1']." ".$_POST['status']." for you " ;
$mail->Body = " Hi, your site with no. ".$_POST['site1']." in phase ".$_POST['phase1']." has been ".$_POST['status'] ;
if ($mail->Send() == true) {
echo "The message has been sent";
}
else {
echo "The email message has NOT been sent for some reason. Please try again later";
echo "Mailer error: " . $mail->ErrorInfo;
}
}
?>