I installed postfix in order to enable SMTP
i followed all the steps.. i was able to receive my emails on my verified email address till thrusday
but they were blank.
suddenly it stopped on saturday
the php code is executing in the same way as it use to execute earlier
<?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 = 'abc@gmail.com';
$body = 'Name: ' . $name . "\n\n" . 'Email: ' . $email . "\n\n" . 'Subject: ' . $subject . "\n\n" . 'Message: ' . $message;
$headers = "From: mail <$email_from>\r\n";
$headers .= "MIME-Version: 1.0" ."\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$success = mail($email_to, $subject, $body,$header);
echo json_encode($status);
die;
please suggest
Aucun commentaire:
Enregistrer un commentaire