0

this is the mail body header subject and message

$headers = 'MIME-Version: 1.0' . PHP_EOL;
    $headers .= "Content-Type: text/html" . PHP_EOL;
    $headers .= "From: domin name" . PHP_EOL;
    $subject = "1+1 Weekend Bonanza from Pizza Hut";
$message = "";
$message .= '<html>
    message body
</html>';

*this is the mail function which i'm using.

mail($to, $subject, $message, $headers);*

My mail always go in the spam folder help me to send it in the inbox as it is very important to send them in the inbox pleae help me out.

Thanks for help in advance.

I'm unable to post the image as my reputation is low. in place of image i have written their is a image.

Tyralcori
  • 1,079
  • 13
  • 33
pradeep
  • 17
  • 4

2 Answers2

0

Email usually arrives to span because of bad headers. Try looking here.

<?php
  $headers .= "Organization: Sender Organization\r\n";
  $headers .= "MIME-Version: 1.0\r\n";
  $headers .= "Content-type: text/plain; charset=iso-8859-1\r\n";
  $headers .= "X-Priority: 3\r\n";
  $headers .= "X-Mailer: PHP". phpversion() ."\r\n"
?>
Justinas
  • 41,402
  • 5
  • 66
  • 96
0

This additional headers for ur emails might help you

$subject = "1+1 Weekend Bonanza from Pizza Hut";
$header = "from: domin name \r"."<br >";
$header .= "Content-Type: text/html; charset=ISO-8859-1 \r"."<br >";
$header .= "Return-Path: <mail@domainname.com> \r"."<br >";
$header .= "X-Priority: 1 (Highest) \r"."<br >";
$header .= "X-MSMail-Priority: High \r"."<br >";
$header .= "Importance: High \r"."<br >"; 
$header .= "MIME-Version: 1.0 \r"."<br >";

$message = "<html>
<head>
<meta http-equiv='content-type' content='text/html;charset=UTF-8' />
//Add more here 
Mohit S
  • 13,723
  • 6
  • 34
  • 69
  • thanks for help but not working. – pradeep Jul 22 '14 at 06:54
  • I figured it out To send your mail to inbox you need to add this point mail($to,$subject,$message,$header,"-f info@yourdomain.com ") thanks for the help all of you. – pradeep Jul 23 '14 at 12:40