mail not reached to my email id - php

i have this code in my contact page.
<script src="js/jquery-1.9.1.min.js"></script>
<script src="js/main.js"></script>
<script>
jQuery(document).ready(function() {
$("#submit").click(function()
{
var pattern = /^[a-zA-Z0-9\-_]+(\.[a-zA-Z0-9\-_]+)*#[a-z0-9]+(\-[a-z0-9]+)*(\.[a-z0-9]+(\-[a-z0-9]+)*)*\.[a-z]{2,4}$/;
//var pn = /^(\+91-|\+91|0)?\d{10}$/;
var email = $("#email").val();
var message = $("#message").val();
var subject = $("#subject").val();
var name = $("#name").val();
if(name=="")
{
//$('#empty1').show(1).delay(5000).fadeOut();
$('#name').focus();
return false;
}
else if(message=="")
{
//$('#empty4').show(1).delay(5000).fadeOut();
$('#message').focus();
return false;
}
else if(subject=="")
{
//$('#empty4').show(1).delay(5000).fadeOut();
$('#subject').focus();
return false;
}
else if(!(pattern.test(email)))
{
//$('#error2').show(1);
$('#email').focus();
}
else if(email=="")
{
//$('#empty2').show(1).delay(5000).fadeOut();
$('#email').focus();
return false;
}
else
{
var dataString = 'name='+ name + '&email=' + email + '&message=' + message + '&subject=' + subject;
$.ajax({
type: "POST",
url: "mail.php",
data: dataString,
success: function(){
//$('.success').show('slide').delay(5000).fadeOut();
$("#contact-form")[0].reset();
alert("Your Detail Is Submitted, We Will Connect With You Soon.");
}
});
}
return false;
});
});
and i have form like that.
<form class="b-form b-contact-form m-contact-form" action="" style="margin-bottom: 10px;" id="contact-form">
<div class="input-wrap">
<i class="icon-user"></i>
<input class="field-name" type="text" placeholder="Name (required)" name="name" id="name">
</div>
<div class="input-wrap">
<i class="icon-envelope"></i>
<input class="field-email" type="text" placeholder="Email (required)" name="email" id="email">
</div>
<div class="input-wrap">
<i class="icon-pencil"></i>
<input class="field-subject" type="text" placeholder="Subject" name="suject" id="subject">
</div>
<div class="textarea-wrap">
<i class="icon-pencil"></i>
<textarea class="field-comments" placeholder="Message" name="message" id="message"></textarea>
</div>
<input class="btn-submit btn colored" type="submit" value="Submit Comment" id="submit" name="submit">
</form>
and also i have ajax mail.php page.
<?php
$to = "demo#example.com";
$subject = $_REQUEST["subject"];
$message = "message=".$_REQUEST["message"]."<br />";
$message .= "name=".$_REQUEST["name"]."<br />";
$message .= "email=".$_REQUEST["email"];
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
$headers .= "From:" .$_REQUEST["email"]. "\r\n";
mail($to,$subject,$message,$headers);
?>
i done servers mail forwarding setting, and also i check the ajax call, and what data will it parsing. using console apnel.
but i cant reached the mail in my email id.
please help me, what can i do now?

Here, give this a try.
Your message variables were not properly formatted and I modified your headers a bit.
This worked for me, minus your jQuery method.
<?php
$to = "demo#example.com";
$name = $_REQUEST['name'];
$email = $_REQUEST['email'];
$subject = $_REQUEST['subject'];
$message = $_REQUEST['message'];
$message .= "" . "<br/>";
$message .= "name= $name" . "<br/>";
$message .= "email= $email" . "<br/>";
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
$headers .= "From: $email" . "\r\n" .
"Reply-To: $email" . "\r\n" .
"X-Mailer: PHP/" . phpversion();
if(mail($to,$subject,$message,$headers)){
echo "Success!!";
}
else {
echo "Sorry.";
}
?>

Related

Refresh page after submit contact form [duplicate]

This question already has answers here:
How do I make a redirect in PHP?
(34 answers)
Closed 2 years ago.
Hello guys i already have a problem with my contact form example when i press send email, email is going but the page wont do anything or even it doesnt show succes message, i want the contact form to be cleared after i press submit button.. website
My html code
<div class="col-md-6 col-lg-6 col-sm-12 col-xs-12">
<div class="contact-form mb50 wow fadeIn">
<h2>Send Message</h2>
<form action="process.php" id="contact-form" method="post">
<div class="form-group" id="name-field">
<div class="form-input">
<input type="text" class="form-control" id="form-name" name="form-name" placeholder="Name.." required>
</div>
</div>
<div class="form-group" id="email-field">
<div class="form-input">
<input type="email" class="form-control" id="form-email" name="form-email" placeholder="Email.." required>
</div>
</div>
<div class="form-group" id="phone-field">
<div class="form-input">
<input type="text" class="form-control" id="form-phone" name="form-phone" placeholder="Phone...">
</div>
</div>
<div class="form-group" id="message-field">
<div class="form-input">
<textarea class="form-control" rows="6" id="form-message" name="form-message" placeholder="Your Message Here..." required></textarea>
</div>
</div>
<div class="form-group">
<button type="submit">Send Message</button>
</div>
My process.php code
<?php
// Configure your Subject Prefix and Recipient here
$subjectPrefix = '[Contact Form Website]';
$emailTo = '<info#mywebsite.com>';
$errors = array(); // array to hold validation errors
$data = array(); // array to pass back data
if($_SERVER['REQUEST_METHOD'] === 'POST') {
$name = stripslashes(trim($_POST['name']));
$email = stripslashes(trim($_POST['email']));
$phone = stripslashes(trim($_POST['phone']));
$message = stripslashes(trim($_POST['message']));
if (empty($name)) {
$errors['name'] = 'Name is required.';
}
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
$errors['email'] = 'Email is invalid.';
}
if (empty($phone)) {
$errors['phone'] = 'Phone is required.';
}
if (empty($message)) {
$errors['message'] = 'Message is required.';
}
// if there are any errors in our errors array, return a success boolean or false
if (!empty($errors)) {
$data['success'] = false;
$data['errors'] = $errors;
} else {
$subject = "$subjectPrefix $subject";
$body = '
<strong>Name: </strong>'.$name.'<br />
<strong>Email: </strong>'.$email.'<br />
<strong>Phone: </strong>'.$phone.'<br />
<strong>Message: </strong>'.nl2br($message).'<br />
';
$headers = "MIME-Version: 1.1" . PHP_EOL;
$headers .= "Content-type: text/html; charset=utf-8" . PHP_EOL;
$headers .= "Content-Transfer-Encoding: 8bit" . PHP_EOL;
$headers .= "Date: " . date('r', $_SERVER['REQUEST_TIME']) . PHP_EOL;
$headers .= "Message-ID: <" . $_SERVER['REQUEST_TIME'] . md5($_SERVER['REQUEST_TIME']) . '#' . $_SERVER['SERVER_NAME'] . '>' . PHP_EOL;
$headers .= "From: " . "=?UTF-8?B?".base64_encode($name)."?=" . "<$email>" . PHP_EOL;
$headers .= "Return-Path: $emailTo" . PHP_EOL;
$headers .= "Reply-To: $email" . PHP_EOL;
$headers .= "X-Mailer: PHP/". phpversion() . PHP_EOL;
$headers .= "X-Originating-IP: " . $_SERVER['SERVER_ADDR'] . PHP_EOL;
mail($emailTo, "=?utf-8?B?" . base64_encode($subject) . "?=", $body, $headers);
$data['success'] = true;
$data['message'] = 'Congratulations. Your message has been sent successfully';
}
// return all our data to an AJAX call
echo json_encode($data);
}
My contact-form.js code
(function ($, window, document, undefined) {
'use strict';
var $form = $('#contact-form');
$form.submit(function (e) {
// remove the error class
$('.form-group').removeClass('has-error');
$('.help-block').remove();
// get the form data
var formData = {
'name' : $('input[name="form-name"]').val(),
'email' : $('input[name="form-email"]').val(),
'phone' : $('input[name="form-phone"]').val(),
'message' : $('textarea[name="form-message"]').val()
};
// process the form
$.ajax({
type : 'POST',
url : 'process.php',
data : formData,
dataType : 'json',
encode : true
}).done(function (data) {
// handle errors
if (!data.success) {
if (data.errors.name) {
$('#name-field').addClass('has-error');
$('#name-field').find('.form-input').append('<span class="help-block">' + data.errors.name + '</span>');
}
if (data.errors.email) {
$('#email-field').addClass('has-error');
$('#email-field').find('.form-input').append('<span class="help-block">' + data.errors.email + '</span>');
}
if (data.errors.phone) {
$('#phone-field').addClass('has-error');
$('#phone-field').find('.form-input').append('<span class="help-block">' + data.errors.phone + '</span>');
}
if (data.errors.message) {
$('#message-field').addClass('has-error');
$('#message-field').find('.form-input').append('<span class="help-block">' + data.errors.message + '</span>');
}
} else {
// display success message
$form.html('<div class="alert alert-success">' + data.message + '</div>');
}
}).fail(function (data) {
// for debug
console.log(data)
});
e.preventDefault();
});
}(jQuery, window, document));
Cant you simply add location.reload() in your Js at the end of your function when sending succeeds?
try to add a function in js like that
function myFunction() {
location.replace("https://URL")
}
And then onclick="myFunction()"

PHP mail script not sending textarea and duplicating everything else in body

Im trying to send an e-mail with the following script I've made. But seem to encounter a weird problem that I need help with.
The mail script
// Get field values.
$name = strip_tags($_POST["name"]);
$email = strip_tags($_POST["email"]);
$message = $_POST["msg"];
// Check if e-mail address is valid.
if (filter_var($email, FILTER_VALIDATE_EMAIL)) {
// Set e-mail and subject.
$to = "mail#mydomain.dk";
$subject = "You have a new message.";
// Set header values.
$headers = "From: " . $email . "\r\n";
$headers .= "Reply-To: " . $email . "\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
// Set request body.
$message = "<html>";
$message .= "<body>";
$message .= "<p><b>From:</b><br>" . $name . "</p>";
$message .= "<p><b>Email:</b><br>" . $email . "</p>";
$message .= "<p><b>Message:</b><br>" . $message . "</p>";
$message .= "</body>";
$message .= "</html>";
mail($to, $subject, $message, $headers);
echo "Your email was sent!";
} else {
echo "Invalid Email, please provide an correct email.";
}
The HTML
<form id="contact-form" data-toggle="validator" data-disable="true" role="form">
<div class="form-group">
<label for="name">Navn</label>
<input type="text" name="name" id="contact-name" class="form-control" data-minlength="2" data-error="Please provide a valid name." required>
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
<label for="email">E-mail</label>
<input type="email" name="email" id="contact-email" class="form-control" data-minlength="5" data-error="Please provide a valid e-mail address." required>
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
<label for="message">Your message:</label>
<textarea name="msg" id="contact-email" data-minlength="10" data-error="Your message must be at least 10 characters long." class="form-control" required></textarea>
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
<button id="submit" value="send" class="btn btn-primary">Send</button>
<div id="success"></div>
</div>
</form>
The Javascript
$(document).ready(function(){
$('#success').css('display', 'none');
$('#submit').click(function(e) {
e.preventDefault();
$.ajax({
url: "php/form.php",
data: $("#contact-form").serialize(),
type: 'POST',
statusCode: {
500: function(data) {
$('#success').css('display', 'none');
$('#success').css('color', '#A94442');
$('#success').html('Your message was not sent.');
$('#success').fadeIn(200);
},
404: function(data) {
$('#success').css('display', 'none');
$('#success').css('color', '#A94442');
$('#success').html('Your message was not sent.');
$('#success').fadeIn(200);
},
200: function(data) {
console.log(data);
$('#success').css('display', 'none');
$('#success').css('color', '#74C274');
$('#success').html('Your message was sent.');
$('#success').fadeIn(200);
}
}
});
});
});
The e-mail is sent and received, but the textarea is not getting sent through, and it seems to sent the "email" and "name" field twice in the message body.
The e-mail output looks like this:
From:
Someone
Email:
someone#someone.com
Besked:
From:
Someone
Email:
someone#someone.com
Help will be very much appreciated. Have been trying to fix this for hours now.
The error is located here :
$message .= "<p><b>Message:</b><br>" . $message . "</p>";
You are using the same variable for the message to be sent and the message received by your PHP.
This code will be working :
// Get field values.
$name = strip_tags($_POST["name"]);
$email = strip_tags($_POST["email"]);
$message_text = $_POST["msg"];
// Check if e-mail address is valid.
if (filter_var($email, FILTER_VALIDATE_EMAIL)) {
// Set e-mail and subject.
$to = "mail#mydomain.dk";
$subject = "You have a new message.";
// Set header values.
$headers = "From: " . $email . "\r\n";
$headers .= "Reply-To: " . $email . "\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
// Set request body.
$message = "<html>";
$message .= "<body>";
$message .= "<p><b>From:</b><br>" . $name . "</p>";
$message .= "<p><b>Email:</b><br>" . $email . "</p>";
$message .= "<p><b>Message:</b><br>" . $message_text . "</p>";
$message .= "</body>";
$message .= "</html>";
mail($to, $subject, $message, $headers);
echo "Your email was sent!";
} else {
echo "Invalid Email, please provide an correct email.";
}

Why is php's mail() function successfully sending mail but with blank fields?

Email is arriving at the destination address but with blank fields. What is the cause?
My use of mail() is as follows:
<?php
header('Content-type: application/json');
$status = array(
'type'=>'success',
'message'=>'Email sent!'
);
$name = #trim(stripslashes($_POST['name']));
$email = #trim(stripslashes($_POST['email']));
$subject = #trim(stripslashes($_POST['subject']));
$message = #trim(stripslashes($_POST['message']));
$email_from = $email;
$email_to = 'info#siteaddress.com';
$body = 'Name: ' . $name . "\n\n" . 'Email: ' . $email . "\n\n" . 'Subject: ' . $subject . "\n\n" . 'Message: ' . $message;
$success = #mail($email_to, $subject, $body, 'From: <'.$email_from.'>');
echo json_encode($status);
die;
?>
And the form HTML is:
<form id="main-contact-form" class="contact-form" name="contact-form" method="post" action="sendemail.php" role="form">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<input type="text" class="form-control" required placeholder="Name" name="name" id="name">
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<input type="text" class="form-control" required placeholder="Email address" name="email" id="email">
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="form-group">
<textarea name="message" id="message" required class="form-control" rows="8" placeholder="Message" name="message" id="message"></textarea>
</div>
<div class="form-group">
<button type="submit" class="btn btn-danger btn-lg">Send Message</button>
</div>
</div>
</div>
</form>
$subject = #trim(stripslashes($_POST['subject'])); but your form don't have subject, you should add it.
Don't suppress errors by #, because you never will know what exactly happens with your code.
Finally Got the Answer.... Problem is that my form was not posting anything because the following script was missing
<script>
var form = $('.contact-form');
form.submit(function () {
$this = $(this);
$.post($(this).attr('action'),$(this).serialize(), function(data) {
$this.prev().text(data.message).fadeIn().delay(3000).fadeOut();
},'json');
return false;
});
</script>
i have added $(this).serialize() to the script and now the mail is working properly...
Thanks all of you....
Hi I´m have the same problem on a 000webhost app. I solve this with two moodifications
1rst:
Add var name = $("input#name").val(); for a form values and in to the ajax function name: name, for a form values
var form = $('#main-contact-form');
form.submit(function(event){
event.preventDefault();
var name = $("input#name").val();
var email = $("input#email").val();
var subject = $("input#subject").val();
var message = $("textarea#message").val();
var form_status = $('<div class="form_status"></div>');
$.ajax({
url: $(this).attr('action'),
type: "POST",
data: {
name: name,
email: email,
subject: subject,
message: message,
},
cache: false,
beforeSend: function(){
form.prepend( form_status.html('<p><i class="fa fa-spinner fa-spin"></i> Email enviandose</p>').fadeIn() );
}
}).done(function(data){
form_status.html('<p class="text-success"> Gracias por la consulta, a la brevedad estaremos respondiendo</p>').delay(3000).fadeOut();
//clear all fields
$('#main-contact-form').trigger("reset");
});
});
2nd: The tag id"name" id"email" id"XX" in mi Form in my case
$success = #mail($email_to, $subject, $body, 'From: <'.$email_from.'>');
//to Replace This
$header .= 'MIME-Version: 1.0' . "\r\n";
$header .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$success = #mail($email_to, $subject, $body, 'From: <'.$email_from.'>',,$header);
if( $success == true )
{
//success Message
}
else{
//Error Message
}

jquery submit contact form

I'm trying to hide the form and show the success alert after the mail is mailed.
But everything I do, is ignored by the code, I put header before the mail function, and the mail still sends, it should redirect before the mail sends, tried to break the code before the mail function, and the break functions works.
at list the mail doesn't send.
contact.php:
<div id="innerWrapper">
<h1 class="pageheading"><?=translate('contact_us') ?></h1>
<form class="form-horizontal" action="/ajax/contact.php" method="POST" id="contactForm">
<?php $email = $db->get_row("SELECT email,full_name FROM users WHERE userID = 1");?>
<label><?=translate('your_name') ?>:</label>
<input type="text" name="name" <?php if($usersObject->ID()) {echo 'value = "'. $email->full_name. '"';} else {echo 'placeholder = "First / Last"';}?> class="required input-xlarge"/>
<br/><br/>
<label><?=translate('email') ?>:</label>
<input type="email" name="email" <?php if($usersObject->ID()) {echo 'value = "'. $email->email . '"';} else {echo 'placeholder = "email#example.com"';}?> class="required input-xlarge"/>
<br/><br/>
<label>Subject:</label>
<input type="text" name="<?=translate('subject') ?>" placeholder="Hi" class="required input-xlarge"/>
<br/><br/>
<label><?=translate('message') ?>:</label>
<textarea name="message_to_us" class="input-xlarge required" rows="5" placeholder=""></textarea>
<br/><br/>
<input class="btn btn-large btn-warning" value="<?=translate('contact_btn') ?>" type="submit" name="sbc"/>
</form>
</div>
ajax/contact.php :
if(isset($_POST['sbc'])) {
foreach($_POST as $K=>$V) $_POST[$K] = trim(strip_tags($V));
extract($_POST);
foreach($_POST as $k=>$v) {
if(trim($v) == "")
{
print '<div class="alert alert-error">All fields are required</div>';
exit;
}
}
$body = 'New contact form message on ' . $_SERVER['SERVER_NAME'];
$body .= '<br/>';
$body .= 'Subject : ' . $Subject;
$body .= '<br/>';
$body .= 'Name : '.$name .' / Email : ' . $email;
$body .= '<br/>';
$body .= $message_to_us;
$headers = "From: contact#" . str_replace("www.", "", $_SERVER['SERVER_NAME']) . "\r\n";
$headers .= "Reply-To: ". $email . "\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=utf-8\r\n";
mail(PAYPAL_EMAIL, str_replace("www.", '', $_SERVER["SERVER_NAME"]), $body, $headers);
?>
<script type="text/javascript">
$("#sbc").click(function() {
$("#contactForm").hide('slow');
});
</script>
<?php
print '<div class="alert alert-success">'.translate('thankyou_contact').'</div>';
}else{
print 'Emtpy request';
}
edit:
$headers .= "Content-Type: text/html; charset=utf-8\r\n";
header('Location: join');
mail(PAYPAL_EMAIL, str_replace("www.", '', $_SERVER["SERVER_NAME"]), $body, $headers);
tried to redirect before the mail just to check, but it just ignores the header and still mail the mail.
edit2 :
<script type="text/javascript">
$(document).ready (function() {
$("#sbc").click(function() {
$("#contactForm").hide('slow');
});
});
</script>
not working.
add id= sbc to
<input class="btn btn-large btn-warning" value="<?=translate('contact_btn') ?>" type="submit" name="sbc" id="sbc"/>

Ajax + Jquery + PHP Mail Implementation Doesn't Send Mail [duplicate]

This question already has answers here:
PHP mail function doesn't complete sending of e-mail
(31 answers)
Closed 8 years ago.
I have a form which upon submission directs to a aspx page, which uses the form's data. Before directing to the above stated page, jquery is used alongside ajax to retrieve form values, and it sends everything to my php email file, which should be sending me informational emails whenever a form is submitted. Unfortunately I recevie nothing, everything else works, but I don't receive any email. Please help, I'm not sure why this isn't working.
Additional Info: I'm using wordpress and have called the jquery file via the functions.php. The php file is called via the jquery file.
Thanks in Advance!
HTML Form
<form action="https://redirection_page.aspx" method="get" name="nform" id="nform">
<div class="submission">
<div class="fname">
<input type="text" name="firstName" class="fname" placeholder="First name" required="">
</div>
<br>
<div class="lname">
<input type="text" name="lastName" class="lname" placeholder="Last name" required="">
</div>
<br>
<div class="email">
<input type="email" name="email" class="email" placeholder="example#email.com" required="">
</div>
<br>
<div class="phone">
<input type="text" name="homePhone" class="phone" placeholder="Phone Number" required="">
</div>
<br>
<br>
<!-- Edit the Continue Text -->
<div class="form-button">
<input type='button' class="submit tp-button green big :hover.green" value="Continue">
</div>
</div>
</form>
Jquery/Ajax
jQuery(document).ready(function($) {
var nform = $('#nform');
$('#nform .form-button input.submit').click(function(){
var data = {
first : $("#nform input.fname").val(),
last : $("#nform input.lname").val(),
email : $("#nform input.email").val(),
phone : $("#nform input.phone").val(),
};
$.ajax({
type: "POST",
url: "/wp-content/themes/Avada/email.php",
data: data,
success: function(){
$('#nform').submit();
}
});
});
});
PHP Mail
<?php
if($_POST){
$first = $_POST['first'];
$last = $_POST['last'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$sendto = "myemailaddress#gmail.com";
$message = "";
$message .= "<p> Name: " . $first . " " . $last "</p>";
$message .= "<p> Email: " . $email . "</p>";
$message .= "<p> Phone Number: " . $phone . "</p>";
$mail = 'no-reply#'.str_replace('www.', '', $_SERVER['SERVER_NAME']);
$uniqid = md5(uniqid(time()));
$headers = 'From: '.$mail."\r\n";
$headers .= 'Reply-to: '.$mail."\r\n";
$headers .= 'Return-Path: '.$mail."\r\n";
$headers .= 'Message-ID: <'.$uniqid.'#'.$_SERVER['SERVER_NAME'].">\r\n";
$headers .= 'Date: '.gmdate('D, d M Y H:i:s', time())."\r\n";
$headers .= 'X-Priority: 3'."\r\n";
$headers .= 'X-MSMail-Priority: Normal'."\r\n";
$headers .= 'Content-Type: multipart/mixed;boundary="----------'.$uniqid.'"'."\r\n";
$headers .= '------------'.$uniqid."\r\n";
$headers .= 'Content-transfer-encoding: 7bit';
$headers .= 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
//send email
mail($sendto, "Apply Submission by " .$email, $message, $headers);
}
?>
Try to make any feedback from mail.php, then success will fired:
...
//send email
mail($sendto, "Apply Submission by " .$email, $message, $headers);
header("Content-Type:text/html");
echo("ok");
}
?>
Try this:
$.ajax({
type: "POST",
async: false,
url: "/wp-content/themes/Avada/email.php",
data: data,
success: function(){
window.location = "https://redirection_page.aspx/"
}
});
PHP Mail
if(mail($sendto, "Apply Submission by " .$email, $message, $headers)){
echo 'true';
}

Categories