I have a Landing Page with a contact form. When someone fill my contact form, it sends an email by php mail()
. We track with analytics and all the contacts they’re been registered in a database.
Some users, fill the contact form and appears in analytics and in the database, but the mail it’s not sent. We figure out that those ones are coming from iPhone and tablet users. We try to mix the headers with PHP_EOL, \r \n, \n
and still not working. We try as well to add Content-Transfer-Encoding: quoted-printable
, but nothing.
I use this form:
<form id="contact" method="post" action="thanks.php">
and the ajax is:
$("#contact").submit(function() {
$.ajax({
type : "POST",
url : "send_mail.php",
dataType : "html",
data : $(this).serialize(),
beforeSend : function() {
$("#loading").show();
},
success : function(response) {
$(location).attr('href', 'http://myurl.com/thanks.php');
$("#response").html(response);
$("#loading").hide();
}
})
});
In my thanks.php I have the insert to my Data Base.
Could somebody help me? thanks!!!