Emails being marked as spam

  • Filter
  • Time
  • Show
Clear All
new posts

    Emails being marked as spam


    Unfortunately, got a problem with emails being sent from my website ending up in spam. Just wondering how to avoid it so they're dealt with properly. Just to warn you I'm beginner with programming.

    On my site there's 2 main mail functions that I require.
    1. Is an email verification when the user registers
    2. Is when one users(A) requirements matches another user(B), an email is automatically generated.

    Unfortunately, a number of these are going to spam which is affecting my site's functionality.

    I use phpmailer() to send the emails. e.g.

    $mail = new PHPMailer();

    $mail->Host = "";
    $mail->SMTPAuth = true; // turn on SMTP authentication
    $mail->Username = ""
    $mail->Password = ""

    $mail->From = "[email protected]";
    $mail->FromName = "Eye2eye Recruitment";
    $mail->AddAddress($row['email'], $forename." ".$surname);
    $mail->AddBCC("[email protected]", "BCC for admin");
    $mail->AddReplyTo(USER's Email);

    $mail->WordWrap = 50;
    $mail->Subject = "Hello";
    $mail->Body = "Text";

    I don't know if the problem is because the Reply to address is one of the other Users rather than the website. Although From is set to the website address. Also, the Users email is also written in the Body of the email. My EUKhost account is a Linux Silver, which is shared. I do request my users to add my address to their address book.

    Many thanks.

    Re: Emails being marked as spam


    It might potentially be because the reply to address is different, which some e-mail providers might consider potential spam but in itself it seems unlikely. From a general guess, it could be because the Reply to Address is different to the Sender Address which some e-mail providers might not like. Are there specific e-mail provider(s) that are filtering your e-mail as spam?

    Another thing you might want to consider is to make sure there is an SPF (Sender Policy Framework) record active to tell other mail servers which check these records that the server that is sending the email is authorised to send them for your domain name. You can add the server IP address to Email Authentication in cPanel.


      Re: Emails being marked as spam

      Hi Ben, thank you for your reply.

      My personal email is with gmail, and that's where I've notice some getting filtered.
      I might change the reply-to address then and see how that goes for a while.

      And I'll look up SPF... ahhh... It's disabled at present. Ok, I've clicked enable & that seems to have done it automatically. (I haven't actually had to type in my ip address)

      Do I need to change any of the Advanced settings, e.g. Additional Hosts or Include (as i use phpmailer?)

      Many thanks


        Re: Emails being marked as spam


        No problem. If the SPF record is set up and you've verified it has listed the correct server IP address then that is all you need to do. You shouldn't need to do anything else.

        Let me know how it goes.

        Kind regards,

        Ben Stones.