내 localserver에서 이메일을 보낼 수 있습니다. 메시지가 전송되지 않았습니다 메일 서버 오류 : 언어 문자열을로드하지 못했습니다 :phpmailer를 사용하여 웹 서버에서 이메일을 보내는 방법
<?php
require("class.phpmailer.php");
$name=$_POST['name'];
$company=$_POST['company'];
$email=$_POST['email'];
$phone=$_POST['phone'];
$subject=$_POST['subject'];
$question=$_POST['question'];
$mailer = new PHPMailer();
$mailer->IsSMTP();
$mailer->Host = 'ssl://smtp.gmail.com';
$mailer->Port = 465; //can be 587
$mailer->SMTPAuth = TRUE;
$mailer->Username = '[email protected]'; // Change this to your gmail address
$mailer->Password = '*********'; // Change this to your gmail password
$mailer->From = '[email protected]'; // Change this to your gmail address
$mailer->FromName = 'Client'; // This will reflect as from name in the email to be sent
$mailer->Body = "Name :".$name."\n\nCompany :".$company."\n\nEmail :".$email."\n\nPhone :".$phone."\n\n\n".$question."";
$mailer->Subject = $subject;
$mailer->AddAddress('[email protected]'); // This is where you want your email to be sent
/*$mailer->AddAttachment('attach_file/'.$_FILES["file"]["name"]);*/
if(!$mailer->Send())
{
echo "Message was not sent<br/ >";
echo "Mailer Error: " . $mailer->ErrorInfo;
}
else
{
header ('Location:index.html');
}
?>
같은 스크립트 언어를 설정해야한다는 생각을 그들의 시스템에서. 어떤 공급자가 있습니까? –
로컬 호스팅 제공 업체의 서버를 대여합니다. eicra soft ltd – user1493448
나는 SwiftMailer를 시도하는 것이 좋습니다. –