My emails are being filtered as SPAM.

Discussion in 'Making Money' started by TheLoneSynchro, Nov 4, 2014.

  1. TheLoneSynchro

    TheLoneSynchro Regular Member

    Sep 13, 2013
    Likes Received:
    Sorry if this is not the correct section, I looked for about ten minutes for an email marketing section, nothing:

    See, I would understand this if I had ever had a mailing list, or if I was actually flooding people with emails in the past, but that's not the case. In-fact I've never even attempted to get into e-mail marketing and that's not what I'm trying to do right now.

    It's absolutely vital for my clients to get this e-mail as it's the email that's sent to them containing their licensing information, and receipt showing my companies custom transaction id; Here's the code that I'm using to send my e-mail, maybe somebody with some experience could give me some pointers.

    Please Note, I had removed my product name and website from the code, so you will see "xxxxxxx" a lot, but in the actual code it's set up with my real domain and product name.

    $subject = 'Thank you for purchasing xxxxxxx.';
                        $headers = "From: [email protected]\r\n";
                        $headers .= "Reply-To: [email protected]\r\n";
                        $headers .= "MIME-Version: 1.0\r\n";
                        $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
                        $message = "
                                    <h1>Thank you for purchasing an xxxxxxx license.</h1>
                                    <p>Unfortunately there is one more step you have to take to claim your license,
                                    but to equal this out we made this process only take around two minutes. The
                                    reasoning for this is to make sure that the license is properly bound to your account.</p>
                                    <p>To activate your license please click <a href='".$custom_transaction_id."&ref=".$referral."'>here</a>.</p>
                                    <p>If the above link does not work, please paste this into your web-browser:".$custom_transaction_id."&ref=".$referral."</p>
                                    <p>If you have any questions that you need answered about xxxxxxx please visit our community, found <a href=''>here</a>.<p>
                                    <h3>Information about your purchase.</h3>
                                            <th>Transaction ID:</th>
                                            <th>Date of sale:</th>
                                            <td>".(new \DateTime())->format('Y-m-d H:i:s')."</td>
                                            <th>Receipt Amount:</th>
                                            <th>Product Name:</th>
                                    <p>Thanks again for purchasing xxxxxxx and we hope you have a wonderful day.</p>
                        mail($myemail, $subject, $message, $headers);

    If the problem is not due to the code itself, which after viewing numerous different pages I would say is written how it should be, why is my email being filtered as spam? This so far has only been tested with gmail, but if gmail is marking it, I'm sure others are.

    Are there any methods I can follow that will help me get removed from the spam list?
  2. captainEO

    captainEO Junior Member

    Mar 12, 2014
    Likes Received:
    It looks like you're sending transactional email. So use an SMTP relay service to send your emails. Big ESPs/SMTP providers are well established, so they have whitelisted IPs. This makes it really easy for your emails to reach the inbox when sending with them.

    I suggest Mandrill. It offers 12,000 free emails each month and it allows SMTP relays/API calls. Both will work with PHP (it looks like you're using PHP to send your messages). Mailjet is another transactional email/SMTP relay service.

    Hopefully, I helped.
  3. linuxsmtp

    linuxsmtp Power Member

    Feb 13, 2014
    Likes Received:
    Email / Smtp developer
    Home Page:
    There are many variables why emails go to spam.
    -No spf/dkim/rdns
    -Too many messages from 1 IP
    -Too many messages from the same "FROM"
    -Repeated messages
    -Too many bounce email
    -Your links are flagged as spam
    -Many people mark your messages as spam
    -Your server or ISP ip address are flagged as spam.
    -Your email server is new (reputation)
    -Html on body of messages
    -Bad keywords on body of messages