Всем добрый вечер. Настроил скрипт, а письма не приходят, долго копался, но без толку. Я зеленый. Не поможете найти ошибку? Код (PHP): <?php $contact_email = lukin_smof_data('contact_email'); $nameError =''; $emailError =''; $commentError = ''; //If the form is submitted if(isset($_POST['submitted'])) { //Check to see if the honeypot captcha field was filled in if(trim($_POST['checking']) !== '') { $captchaError = true; } else { //Check to make sure that the name field is not empty if(trim($_POST['contactName']) === '') { $nameError = 'You forgot to enter your name.'; $hasError = true; } else { $name = trim($_POST['contactName']); } if(trim($_POST['tel']) == '') { $telError = 'Forgot your tel!'; $hasError = true; } else { $tel = trim($_POST['tel']); } //Check to make sure sure that a valid email address is submitted if(trim($_POST['email']) === '') { $emailError = 'You forgot to enter your email address.'; $hasError = true; } else if (!eregi("^[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,4}$", trim($_POST['email']))) { $emailError = 'You entered an invalid email address.'; $hasError = true; } else { $email = trim($_POST['email']); } //Check to make sure comments were entered if(trim($_POST['comments']) === '') { $commentError = 'You forgot to enter your message.'; $hasError = true; } else { if(function_exists('stripslashes')) { $comments = stripslashes(trim($_POST['comments'])); } else { $comments = trim($_POST['comments']); } } //If there is no error, send the email if(!isset($hasError)) { $emailTo = lukin_smof_data('contact_email'); $tel = $tel; $sendCopy = trim($_POST['sendCopy']); $body = "Name: $name \n\nEmail: $email \n\nMessage: $comments"; $headers = 'From: ICONT <'.$emailTo.'>' . "\r\n" . 'Reply-To: ' . $email; wp_mail($emailTo, $tel, $body, $headers); if($sendCopy == true) { $tel = '[Copy] your submission'; $headers = 'From: '.lukin_smof_data('contact_email'); wp_mail($email, $tel, $body, $headers); } $emailSent = true; } } } ?>
На компьютере с которого отправляешь письмо должна быть программа которая отошлёт его, посмотри в ней, получает ли она от php письмо.