1
PHPMailer 클래스로 이메일을 보내는 데 문제가 있습니다. 양식을 제출 한 후 메일을 보내고 확인 메일을 보내지만 메일을 수신하지 않습니다.smtp phpmailer를 사용하여 메일을 보내지 않습니다.
나는 IP 주소와 먼 서버에 저장되어있는 문제가 SMTP 인증으로,하지만 나는 것은 문제도 소스 응용 프로그램을 찾을 순 없었 추측 : 175.2.3.69와 나는 메일을
을 보낼 전망 수를 사용 문제와코드는 다음과 같습니다
require_once('../libs/PHPMailer/class.phpmailer.php');
//Ensuite on débute l'envoi de mail
$mail = new PHPmailer();
$mail->IsSMTP(); // telling the class to use SMTP
try {
$mail->Host = "messagerie.abc.a.fr"; // SMTP server
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->Port = 25; // set the SMTP port for the GMAIL server
$mail->Username = "[email protected]"; // SMTP account username
$mail->Password = "password"; // SMTP account password
$mail->AddReplyTo('[email protected]', 'First Last');
$mail->AddAddress('[email protected]', 'John Doe');
$mail->SetFrom('[email protected]', 'First Last');
$mail->AddReplyTo('[email protected]', 'First Last');
$mail->Subject = 'PHPMailer Test Subject via mail(), advanced';
$mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; // optional - MsgHTML will create an alternate automatically
$mail->MsgHTML(file_get_contents('contents.html'));
$mail->Send();
echo "Message Sent OK<p></p>\n";
} catch (phpmailerException $e) {
echo $e->errorMessage(); //Pretty error messages from PHPMailer
} catch (Exception $e) {
echo $e->getMessage(); //Boring error messages from anything else!
}
스팸 폴더를 다시 확인 했습니까? –
예.하지만 메일을 찾지 못했습니다. – user3885131