Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

alucard2876

Newbie
  
  • Posts

    1
  • Joined

  • Last visited

alucard2876's Achievements

Newbie

Newbie (1/14)

  • First Post
  • Conversation Starter
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. Добрый день. Такая беда: не хочет работать обратная связь. Пробовал использовать PHPmail и SMPT ничего,связался с поддержкой на хостинге,спроситть включен ли SAFE MODE - оказалось выключен. Пробовал проверить работает ли вообще отправка на мыло сообщений этим скриптом <?php mail ('[email protected]','test send','messege') ?> все работает,не могу понять в чем проблема вот код $(document).ready(function() { //E-mail Ajax Send $("form").submit(function() { //Change var th = $(this); $.ajax({ type: "GET", url: "engine/modules/mail_test.php", //Change data: th.serialize() }).done(function() { alert("Thank you!"); setTimeout(function() { // Done Functions th.trigger("reset"); }, 1000); }); return false; }); }); <?php $method = $_SERVER['REQUEST_METHOD']; //Script Foreach $c = true; if ( $method === 'POST' ) { $project_name = trim($_POST["project_name"]); $admin_email = trim($_POST["admin_email"]); $form_subject = trim($_POST["form_subject"]); foreach ( $_POST as $key => $value ) { if ( $value != "" && $key != "project_name" && $key != "admin_email" && $key != "form_subject" ) { $message .= " " . ( ($c = !$c) ? '<tr>':'<tr style="background-color: #f8f8f8;">' ) . " <td style='padding: 10px; border: #e9e9e9 1px solid;'><b>$key</b></td> <td style='padding: 10px; border: #e9e9e9 1px solid;'>$value</td> </tr> "; } } } else if ( $method === 'GET' ) { $project_name = trim($_GET["project_name"]); $admin_email = trim($_GET["admin_email"]); $form_subject = trim($_GET["form_subject"]); foreach ( $_GET as $key => $value ) { if ( $value != "" && $key != "project_name" && $key != "admin_email" && $key != "form_subject" ) { $message .= " " . ( ($c = !$c) ? '<tr>':'<tr style="background-color: #f8f8f8;">' ) . " <td style='padding: 10px; border: #e9e9e9 1px solid;'><b>$key</b></td> <td style='padding: 10px; border: #e9e9e9 1px solid;'>$value</td> </tr> "; } } } $message = "<table style='width: 100%;'>$message</table>"; function adopt($text) { return '=?UTF-8?B?'.Base64_encode($text).'?='; } $headers = "MIME-Version: 1.0" . PHP_EOL . "Content-Type: text/html; charset=utf-8" . PHP_EOL . 'From: '.adopt($project_name).' <'.$admin_email.'>' . PHP_EOL . 'Reply-To: '.$admin_email.'' . PHP_EOL; mail($admin_email, adopt($form_subject), $message, $headers );?> Помогите пожалуйста
Guest
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.