1

I'm using PHPMailer to send my emails via SMTP. I have a class where once initialized it automatically connects to my server through it's I.P address and logs into my email account.

Snippet from class,

function __construct()
        {
            global $PHPMailer;

            $PHPMailer->IsSMTP();                                     
            $PHPMailer->Host = '67.222.10.87';  
            $PHPMailer->SMTPAuth = true;                               
            $PHPMailer->Username = 'support@networkyourfortune.co.uk';                           
            $PHPMailer->Password = "MYPASSWORD";                      
            $PHPMailer->SMTPSecure = '';        
        }

public function sendEmail($email, $subject, $message, $altMessage) {

            global $PHPMailer;

            $PHPMailer->From = 'support@networkyourfortune.co.uk';
            $PHPMailer->FromName = 'Network Your Fortune';
            $PHPMailer->AddAddress($email); 
            $PHPMailer->AddReplyTo('support@networkyourfortune.co.uk', 'Support');

            $PHPMailer->WordWrap = 50;     
            $PHPMailer->IsHTML(true);  
            $PHPMailer->CharSet = "text/html; charset=UTF-8;"; 

            $PHPMailer->Subject = $subject;
            $PHPMailer->Body = $message;
            $PHPMailer->AltBody  = $altMessage; 

            if($PHPMailer->Send())
                return true;
            else
                return false;

        }

Snippet from php file that sends the email,

    $mailHandler = MailHandler::getInstance();

    $HTMLMessage = "

        <html>
        <body>

            <p>

                Hello Jack,

                We are so happy you have took your first step with us and welcome you to Network Your Fortune. We hope you are excited at our systems potential for all
                our memebers.

                Click the link below to get direct access to our website where you will find how you can join our free rota today!

                <a href='http://networkyourfortune.co.uk/rotainfo/'>Click Here To See And Join Our Rota!</a>

            </p>

        </body>
        </html>

    ";

    $altMessage = "

        <html>
        <body>

            <p>

                Hello Jack,

                We are so happy you have took your first step with us and welcome you to Network Your Fortune. We hope you are excited at our systems potential for all
                our memebers.

                Click the link below to get direct access to our website where you will find how you can join our free rota today!

                Click Here To See And Join Our Rota!: http://networkyourfortune.co.uk/rotainfo/

            </p>

        </body>
        </html>

    ";

    if($mailHandler->sendEmail("web-drq5bn@mail-tester.com", "JACK RESPONSE REQUIRED: Add Yourself To Our Rota", $HTMLMessage, $altMessage))
        echo "Sent";
    else
        echo "Error while sending";

The section of code above generates a message and sends it. The problem is that it just goes right into my spam folder on two different email accounts.

I did a test on my message via mail-tester.com, see results here.

It uses SpamAssassin which is an "Open Source anti-spam platform" and used across a HUGE number of email servers being a standard for spam filtering. The key results were as shown,

enter image description here

It says, "HTML: images with 800-1200 bytes of words You should write more text in your email". Doing a little research this error seems to be flagged if you have no text at all and only an image. I have text and no images!

It says, "HTML and text parts are different". If you have HTML links and you have to remove them for alt version then of course it's going to be a little different, that's 0.724 points lost because of that!

It also says, "Delivered to internal network by a host with no rDNS", where I have contacted my hosting provider for my virtual private server and they have verified that reverse DNS is working perfectly..

It's the worst feeling when not a single one of your messages deliver without going into spam. Could someone please enlighten on where or who is going wrong here. I really appreciate any help towards my problem.

Jack Trowbridge
  • 3,175
  • 9
  • 32
  • 56
  • 1
    You could always contact the mail-tester.com team about this, although every time I've pointed out errors in their tool the response has been roughly, "it's not a bug, it's a feature." – Sammitch Sep 16 '15 at 00:38
  • 1
    " You should write more text in your email" seems clear –  Sep 16 '15 at 00:38
  • 1
    The source code of your email on mail-tester contains this: `3D"Avast`. Any ideas where it comes from? – CarHa Sep 16 '15 at 03:49
  • 1
    This is the problem with spam filters - they are absolutely non-standard and subject to random configuration. I once encountered one at a large UK ISP that blacklisted *all* recipients, so you could email someone *once*! You should be able to verify reverse DNS yourself. There are many other factors that are nothing to do with message content - recpient engagement is particularly difficult to influence. – Synchro Sep 16 '15 at 06:10
  • I'm in contact with my VPS provider about the avast image, I have little idea where that is coming from but defiantly not in my message when sending it through PHP. I'm also getting the error, MPART_ALT_DIFF, "HTML and text parts are different" I have made them both the same and still getting error. The proof is in the source of the email which can be seen via these results https://www.mail-tester.com/web-V777JY&reloaded=3 – Jack Trowbridge Sep 16 '15 at 20:11

0 Answers0