We help IT Professionals succeed at work.

is phpmailer more/less likely to be put on spam filter than sending mail from server

rgb192
rgb192 used Ask the Experts™
on
is phpmailer more/less likely to be put on spam filter than sending mail from server
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Lead Developer
Commented:
I have found more success from phpmailer because it can send through an actual email account on the server as opposed to just root through the mail() function in PHP.
Most Valuable Expert 2011
Top Expert 2016
Commented:
The PHP mail() function is a 3 on a ten scale.  Whether it ever gets to a 5 is mostly an issue with your hosting company.

phpMailer() is a 5 on a ten scale.  It uses a different mail engine.  Hopefully the "real world" will recognize your use of this mail engine in a positive light.

A hosted service like ConstantContact.com is a 9+ on a ten scale.

Those are subjective evaluations to be sure, but they are founded on years of experience.

HTH, ~Ray
The set up does count for something, but in my opinion, the really big factor is the content of the mail itself. Put the wrong content in there and it does not matter what mailing engine you use.

A simple example - make the subject of your email (or the body of the email) all CAPITALS AND SEE HOW MANY SPAM FILTERS IT GETS THROUGH WITHOUT TRIGGERING A "MESSAGE IS ALL IN CAPS" ERROR. Try sending an email with the words "pharmacy meds" or "Fake Rolex" in the subject.

The best thing to do is to get hold of a test email account that goes through a mail filter like SpamAssassin and then mail that account with a sample email. You can then read SpamAssassin's analysis which is usually added to the email body. Set the Spam Score down to 0.5 so that what ever you send will trigger an "email is spam" event and cause an analysis to be added. If you consistently score less than "3" then your email should be OK. Anything over "5" and your email has no hope.

Author

Commented:
thanks
MurfurFull Stack Developer

Commented:
A lot of it comes down to a content analysis of the incoming email. If it is only an image, then it will be seen as spam, similarly if the text content has certain known structures, phrases etc.

I use phpmailer() to send mailshots to clients, or their consumers and so on, and as an advertising agency, the emails are always fancy designs.

I have found that you have to include the text of the message as text rather than being part of an image so I break up the artwork and use inline CSS to define blocks of colour and background colour to text areas. This gets more interesting when the approved design has some sort of gradient on it... :)

I also make a point of including a text version in the send i.e.

      $mail->Body            = $html_body;
      $mail->AltBody      = $text_body;

That said, this doesn't always guarantee non-spamming as sometimes it is deemed too graphics heavy and therefore gets spammed again. Then I usually put in the text body in again as a small invisible footer i.e. 8px white text on a white background and that has usually seen the email get through.

I need to strip out the confidential stuff before I can post my example so bear with me