메일인증 메일주소 변경 기능 끌수 있나요?
본문
스팸업자가 메일주소변경 기능 이용해서 기존에 허용한 메일 도메인 우회해서 가입하는거같아서요
아니면 메일인증 메일주소 변경 페이지에도 특정 이메일만 입력하게 설정할수 있을까요 .. ?


답변 1
gpt로 해결했습니다.
<?php
// ... (previous code remains unchanged)
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
// Get the submitted email
$new_email = isset($_POST['mb_email']) ? trim($_POST['mb_email']) : '';
// Validate the email domain
if (!preg_match('/@naver\.com$|@gmail\.com$/', $new_email)) {
alert("허용된 이메일 도메인은 @naver.com 또는 @gmail.com 입니다.", G5_URL);
}
// Proceed with the rest of the email update logic here
// ...
}
// ... (rest of the code remains unchanged)
?>
답변을 작성하시기 전에 로그인 해주세요.