Page 1 of 1

PHP mail() going to SPAM--PLS Help

Posted: Mon Nov 24, 2008 3:17 pm
by anirbanb2004
Hi,
I am having astrange problem with mail() .
I am using the fiollowing code

Code: Select all

$to=$email;
$subject='domain.com: Your application will be reviewed soon!';
 
$from='contact@anirban.com';
$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .="From:".$from."\r\nContent-Type: text/html\r\nCc:anirbanb2004@yahoo.com\r\nReply-To:contact@racsuccess.com";
$body='Hi '.$fname.' '.$lname.', thanks for your interest in becoming a aaa mentor.<br>
mail($to,$subject,$body,$headers);
This is always sending mails to spam.Even for GMail and Yahoo it is not atall coming.

Can anyone suggest me what is wrong with the cldoe?

Thanks,
Aniran

Re: PHP mail() going to SPAM--PLS Help

Posted: Tue Nov 25, 2008 4:25 am
by Rovas
Your php code is correct. Check the code were you call this script to see if you send more than one email.
If you\ clients receive the emails in Spam folders it means that the mail address is considered spam by GMail, Yahoo and possibly other mail servers. You can talk to your users\ clients to select the email from you as being not spam or change your email address. Another solution is to convince the administrators of the servers that you' re not spammer so that they remove you from the spammer list.

Re: PHP mail() going to SPAM--PLS Help

Posted: Tue Nov 25, 2008 4:29 am
by anirbanb2004
Thanks A lot,
Is there any thing extra entries for headers that can prevent spamming?For Yahoo and Gmail it is not coming at all :cry: :banghead:

Re: PHP mail() going to SPAM--PLS Help

Posted: Tue Nov 25, 2008 6:08 am
by novice4eva
After seeing your post i did a little search and someone was telling something about mail signature thing, but i literally don't know about the signature thingy, it also read that phpmailer would avoid such "PROBLEM", umm since this forum predominantly opts for swift mailer, i came across this http://swiftmailer.org/wikidocs/v3/tips/spam

So maybe using swiftmailer will avoid the problem of spam TOO !!

:drunk: