1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

My emails are being filtered as SPAM.

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

  1. TheLoneSynchro

    TheLoneSynchro Regular Member

    Joined:
    Sep 13, 2013
    Messages:
    306
    Likes Received:
    77
    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.

    Code:
    $subject = 'Thank you for purchasing xxxxxxx.';
    
                        $headers = "From: noreply@xxxxxxx.net\r\n";
                        $headers .= "Reply-To: noreply@xxxxxxx.net\r\n";
                        $headers .= "MIME-Version: 1.0\r\n";
                        $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
    
    
                        $message = "
                            <html>
                                <body>
                                    <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='http://xxxxxxx.net/licensing/validation.php?trans=".$custom_transaction_id."&ref=".$referral."'>here</a>.</p>
                                    
                                    <p>If the above link does not work, please paste this into your web-browser: http://xxxxxxx.net/licensing/validation.php?trans=".$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='http://xxxxxxx.net/forum/'>here</a>.<p>
                                    
                                    <h3>Information about your purchase.</h3>
                                    <table>
                                        <tr>
                                            <th>Transaction ID:</th>
                                            <td>".$custom_transaction_id."</td>
                                        </tr>
                                            <th>Date of sale:</th>
                                            <td>".(new \DateTime())->format('Y-m-d H:i:s')."</td>
                                        <tr>
                                            <th>Receipt Amount:</th>
                                            <td>".$product_price."</td>
                                        </tr>
                                        <tr>
                                            <th>Product Name:</th>
                                            <td>".$product_name."</td>
                                        </tr>
                                    </table>
                                    
                                    <p>Thanks again for purchasing xxxxxxx and we hope you have a wonderful day.</p>
                                </body>
                            </html>
                                    
                        ";
                        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

    Joined:
    Mar 12, 2014
    Messages:
    100
    Likes Received:
    9
    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 Regular Member

    Joined:
    Feb 13, 2014
    Messages:
    455
    Likes Received:
    65
    Location:
    Philippines
    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