Feb 23, 2012

Prevent mail from PHP comes in Spam folder

Filled under: ,

Some web designers have problems with the e-mail you send from a PHP script that comes with some or all recipients in the Spam folder. This could include for confirmation, an automatic response, a digital mailing, a digital invoice, etc. Very annoying for example when you sent an invoice and the customer never receives because the mail is filtered as spam. How can you prevent this? What options do you have this problem?

Unfortunately, the Spam to this problem is not always a cause. There may be several reasons why the mail you mail example with PHP / Sendmail send to the recipient is considered as spamming. I will in this article some common causes and solutions call and I hope that at least one of these solutions works for you!?

Sender IP address does not match server

PHP mail () sends the emails from the server where the file is hosted. This is often a computer with a different IP address or an IP address not domain name is linked. This is often the case when you use shared hosting services.

You might be able to resolve the server settings to adjust or structure of the PHP mail () to change so that your domain name also reflected in the "received from" header in the mail. But on shared hosting you can not usually perform such adjustments. There is something you can do to reduce the risk of filtering. It can be classified as a spammer in this case prevented by using such PHPMailer or Swift Mailer to play the sending emails.

You can then also, for example the e-mail via a remote SMTP server. This server has a different IP address than the shared hosting and shared hosting ipaddress if on a blacklist then get e-mails always in a spambox. A free solution is to send emails via Gmail with PHPMailer. Here is a

Envelope-from unequal to the e-mail from

In general, you go through the Spam filters come when the envelope-from equal to the from which you send mail. When there is a difference between the from / from the header and this indicates envFrom often spam mail. Often you leave this blank in PHP and then something automatically entered here. You must fill out so well himself. Use the following code above:

$ Headers . = "From: Some Name <$ from> \ r \ n" ;
$ envFrom = '-fmyemail @ email.com " ;
mail ( $ to , $ subject , $ body , $ headers , $ envFrom );
There is no space to stand between the-f and the email address. But there are reports that indicate that a space is a problem and so can give you better opt for the omission of the space.
See this tutorial: http://www.transio.com/content/how-pass-spam-filters-php-mail

Domain or IP number on blacklist

The domain name or the sender address can also be really on a black list. Perhaps for some reason decided that this particular email address you sent the mailing in the past been used for spamming and so is the address to put a filter list.



Types of SPAM filtering
Zie

 http://www.willows-consulting.com/Misc_Web_Developments/How_to_prevent_your_email_arriving_into_a_spam_box.html

How do you know if you filtered?

See http://kb.mailchimp.com/article/how-spam-filters-think

0 comments:

Post a Comment