I am trying to send email using AJAX and PHP but no success:(
My success function alerts me that it is WORKING but i get nothing in my mail box. PHP form is located in my ROOT folder and it is working so i know it is not PHP problem.
Been trying for hours to solve this but no effect. Can someone help out? THX!!! This is what my console.log shows:
name=MY NAME&email=dejo.dekic@yahoo.com&message=SOME MESSAGE
pagepays.js
POST http://www.homepagepays.robertpeic.com/kontakt.php 200 OK 284ms
My jquery code looks like this:
$('#button').click(function(){
var name = $('#name').val();
var email = $('#email').val();
var message = $('#message').val();
var data ='name=' + name + '&email=' + email + '&message=' + message;
console.log(data);
$.ajax({
type:"POST",
url:'kontakt.php',
data: data,
success: function(){
alert('Working!');
}
});
return false;
});