이메일 인증 The following From address failed, MAIL FROM command failed 어떻게하나요?
본문
안녕하세요
config.php
define('G5_SMTP_USE_EXT', 1);
if(defined('G5_SMTP_USE_EXT') && G5_SMTP_USE_EXT == 1){
define('G5_SMTP', 'smtp.naver.com');
define('G5_SMTP_PORT', '465');
define('G5_SMTP_USEAUTH', true);
define('G5_SMTP_USESECURE', 'ssl');
define('G5_SMTP_USER', 'testtest_kr');
define('G5_SMTP_PASS', 'testest123!');
}
else
{
define('G5_SMTP', '127.0.0.1');
define('G5_SMTP_PORT', '25');
}
mailer.lib.php
try {
$mail = new PHPMailer(); // defaults to using php "mail()"
if (defined('G5_SMTP') && G5_SMTP) {
$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host = G5_SMTP; // SMTP server
if(defined('G5_SMTP_PORT') && G5_SMTP_PORT)
$mail->Port = G5_SMTP_PORT;
$mail->SMTPSecure = G5_SMTP_USESECURE;
$mail->SMTPAuth = G5_SMTP_USEAUTH;
$mail->Host = G5_SMTP;
$mail->Username = G5_SMTP_USER;
$mail->Password = G5_SMTP_PASS;
}
$mail->SMTPDebug = 1;
$mail->CharSet = 'UTF-8';
$mail->From = $fmail;
$mail->FromName = $fname;
$mail->Subject = $subject;
$mail->AltBody = ""; // optional, comment out and test
$mail->msgHTML($content);
$mail->addAddress($to);
이렇게 수정하였는데
2023-07-11 12:47:34 CLIENT -> SERVER: EHLO new.testtest-1.co.kr
2023-07-11 12:47:34 CLIENT -> SERVER: AUTH LOGIN
2023-07-11 12:47:34 CLIENT -> SERVER: bWFy2aa2V40aW5nbW9uc3Rlcl9rcg==
2023-07-11 12:47:34 CLIENT -> SERVER: I2tke1TAyN5zaI5IQ==
2023-07-11 12:47:34 CLIENT -> SERVER: MAIL FROM:<*** 개인정보보호를 위한 이메일주소 노출방지 ***>
2023-07-11 12:47:34 SMTP ERROR: MAIL FROM command failed: 554 5.7.1 The sender address is unauthorized 9IWe3qA4oRd4GiaQJ3ikJgBw - nsmtp
The following From address failed: *** 개인정보보호를 위한 이메일주소 노출방지 *** : MAIL FROM command failed,The sender address is unauthorized 9IWe1qA4o2RdGiaQa4J3ikJgBw - nsmtp,554, 5.7.1 SMTP server error: MAIL FROM command failed Detail: The sender address is unauthorized 9IWeq4A4oRdGiaQJ53iakJgBw - nsmtp SMTP code: 554 Additional SMTP info: 5.7.1
2023-07-11 12:47:34 CLIENT -> SERVER: QUIT
error 메시지가 뜨는데 어떻게 해야 하나요?