Page 1 of 1

php mail() problem

Posted: Sat Jun 23, 2007 12:33 pm
by dharprog
Hi

I have a site in which when i send email by using the mail() function its reaching to bulk folder but not to the inbox.

Why its happening to me. What are the requirements i have to take to send a mail by using mail() function in php.

Here is the code function code. Is there any wrong with this?

Code: Select all

mail($remail,$subject,$mesg,"From:$strFrom\r\nReply-to: $strFrom\r\nContent-type: text/html; charset=us-ascii");
Thank you very much.

Posted: Sat Jun 23, 2007 12:43 pm
by Ambush Commander
If you'd like to send HTML email, you're better of using a fully-fledged mailing library like Swiftmailer.

Posted: Sat Jun 23, 2007 4:17 pm
by superdezign
Bad code doesn't put it into the Bulk mail folder, bad e-mail does. Sending a pure HTML e-mail is oftentimes seen as spam. You should send an HTML e-mail with a plaintext alternative. Swiftmailer does this very easily for you.

Posted: Sat Jun 23, 2007 4:31 pm
by maliskoleather
use Swiftmailer. read this.