2

I used this tutorial for sending mail :

http://www.velvetblues.com/web-development-blog/avoid-spam-filters-with-php-mail-emails/

My code looks like this :

$headers .= "Reply-To: The Sender <sender@sender.com>\r\n"; 
$headers .= "Return-Path: The Sender <sender@sender.com>\r\n"; 
$headers .= "From: The Sender <senter@sender.com>\r\n";
$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" 
mail("recipient@recipient.com", "Message", "A simple message.", $headers);

I am using localhost(MAMP PRO) for sending mail.

But mail goes to spam folder.How to send mail which goes to inbox.Please guys help me out from this,i spend a lot of time on it.

Ponting
  • 2,248
  • 8
  • 33
  • 61

2 Answers2

1

Which folder an email goes into depends mostly on the domain & ipaddress from which the email is coming from and the email service provider. If your domain/ip is trusted by the service provider it will not be spammed. Also, after setting a few emails as "Not Spam" from that domain, your email service will no longer spam the emails

Joshua Kissoon
  • 3,269
  • 6
  • 32
  • 58
0

there are more than one reason ur email goes to spam ... 1 - make sure that the "from email" is actually the email u are sending the emails from .. i mean dont use any other false "from Email"

2- you have to keep the message body simple as possible . dont use so much html tags and css experssions , and also try to use tables

Leo Bali
  • 309
  • 1
  • 8