Welcome Guest, Not a member yet? Register   Sign In
Avoiding Spam Filters when using the Email Class?
#1

[eluser]Jason McCallister[/eluser]
I'm building a website that has a contact form that also generates an email to the submitter thanking them for taking the time to contact the website owner.

The code works and sends the email like its supposed to.

However, the email is picked up by spam on a lot of systems. I'm assuming the best method to avoid this would be set the email preferences to use an external SMTP Host for authentication?

Currently the Controller looks like this:

Code:
$this->load->library('email');
$this->email->from($this->validation->email, $this->validation->first . " " . $this->validation->last);
$this->email->to('[email protected]');
$this->email->subject("Contact Form:" . " " . $this->validation->subject);
$this->email->message($this->validation->body);
$this->email->send();

$this->load->library('email');
$this->email->from('[email protected]', $this->validation->first . " " . $this->validation->last);
$this->email->to($this->validation->email);
$this->email->subject('Thank You');
$this->email->message('Dear' . " " . $this->validation->first . "," . "\n \n" . 'Thank you for taking the time to contact me through my website. I will be in touch as soon as possible.' . "\n \n" . "Thank You,\n Website Author \[email protected] \nhttp://mydomain.com");
$this->email->send();
#2

[eluser]Narkboy[/eluser]
Spam is filtered for (primarily) on the basis of two things - what it says and where it came from.

If you're working from a home machine (or office for that matter) then it's a fair bet that your IP is on a black-list somewhere. Many many spam companies blacklist residential (or just non-commercial) IP blocks because of the high risks of botnet spamming. That might be it - try searching blacklists for your IP. If you're at home, then trust it will work better from an actualy host. If you are hosted, then start the slow process of getting that IP removed from the lists. It's doable!

The other thing is the content, but really I can't see anything in there that might offend spam filters.

Smile
#3

[eluser]mddd[/eluser]
I agree with Narkboy, your message CAN get marked as spam based on its content but it is more likely that this is happening because of its origin.
However, I don't agree that hosted websites have less of a problem. If you are using a shared hosting service (as most people are) you are probably sharing a server with many, many other sites. If any of them sends out spam, and the IP is marked as a spam source, everyone suffers the consequences. I have had that happen more than once. And you can't do much about it. Talk to the hosting provider and get them to try and move the IP off the lists. But if other people misbehave, the IP can easily get listed again..
#4

[eluser]Narkboy[/eluser]
Mddd is right actually - the actual IPs of shared hosting sites are frequently black listed. I tend to make use of the hosting companys mail servers, which are generally kept off these lists. Not all hosts will let you, and almost all have pretty serious anti-spam protection to stop them being used as spam relays. My host is nice!

If you want to check your servers IP try here: http://www.mxtoolbox.com/blacklists.aspx (no affiliation - just useful!!)

Also - I wouldn't agree that it's impossible to remove IPs from the blacklists. There are a relatively small number of big lists used by a lot of companies. A little time on Google and you'll find them and also find their removal policies. Companies who run these lists make profits and do so by the accuracy of their lists. Marking or blocknig email that is not spam is bad for business - they'll take IPs off the list safe in the knowledge that if you are spamming, you'll end up right back on it. Your ISP / host provider won't do this for you though, unless you're hosted with me! Big Grin I can take some time, but if you don't have the option to move hosts (or even servers within a host) then get to.

GL!




Theme © iAndrew 2016 - Forum software by © MyBB