1
因此,我試圖發送一封電子郵件,通知辦公室管理員通過表單提交電子郵件的時間。一切都沒有問題,工作時,我曾在「.COM」結尾的郵件然而,當我嘗試使用「.ORG」結尾的郵件php電子郵件功能不能使用.org電子郵件
$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
$email_address = $_POST['email_address'];
$message = $_POST['message'];
if(isset($_POST['submit'])){
$to = "[email protected]"; // Office Admin Email
$from = $email_address; // User's Email
$subject = "Form Submission";
$content_admin = $first_name . " " . $last_name . " wrote the following:" . "\n\n" . $message;
$content_user = "Thanks again for contacting us. A dedicated staff member will contact you as soon as possible. Your message was: \n\n" . $message;
$headers_admin = "From:" . $from;
$headers_user = "From: Example Office";
mail($to,$subject,$content_admin,$headers_admin); //Notification email for admin
mail($from,'Thanks for contacting us',$content_user, $headers_user); //Copy of email sent to user
header('Location: contact_form_success.html'); //Redirect here after submit is clicked
}
「但是,當我嘗試使用以」.org「結尾的電子郵件時......」那麼發生了什麼? – JCutting8
之後發生了什麼?你的錯誤是什麼? – unixmiah