<?php $email = "shift.mail@yandex.ru"; $headers = "From: ".$_SERVER['SERVER_NAME']." <'no_reply@***.info'>\r\n"; $headers = $headers."Content-type: text/html; charset=\"utf-8\"\r\n"; $headers = $headers."Return-path: <'no_reply@***.info'>\r\n"; $message = '<p>e-mail notify<p>'; $subject = 'e-mail notify'; $res = mail( $email, $subject, $message, $headers ); ?>
I need it for e-mail notify of my site. If I use it by url-field of my browser - it works fine (e-mail is sent). But if I try to use it by AJAX request, nothing works:
$.ajax({
url: "email_notify.php",
});
Also, I tried to use $.getJSON, $.post etc.
Could someone tell me, what is wrong with my code?
Thank you

New Topic/Question
Reply


MultiQuote





|