mail gets in to spam

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vjayis
    New Member
    • Mar 2008
    • 134

    mail gets in to spam

    Hi

    i'm sending mail using the below function.,

    the function sends the mail but the recipient gets the mail in spam.,

    could anyone help.,

    [code=php]
    <?
    $headers = "From: '$from'" . "\r\n";
    if(mail("exampl e@gmail.com","h i","how r u",$headers)){e cho 'success';}
    ?>
    [/code]

    regards
    vijay.
  • rizwan6feb
    New Member
    • Jul 2007
    • 108

    #2
    There is nothing wrong with the script. Your ip may be added in the spam list of the server, you are sending mail to

    Comment

    • Atli
      Recognized Expert Expert
      • Nov 2006
      • 5062

      #3
      Hi.

      There are a great many spam-filters out there, and I won't presume to know how they all work.
      But I do believe most of them will consider such short messages to be spam, as this is how much of the actual spam looks like.

      Try sending an actual message, that looks like something you would actually send to somebody.

      You could also try to use some of the free mail classes that are floating around. Many of them have been optimized to include headers and stuff that will make you messages less likely to look like spam.
      For example, Swift Mailer or PHPMailer.

      Comment

      • dlite922
        Recognized Expert Top Contributor
        • Dec 2007
        • 1586

        #4
        Originally posted by vjayis
        Hi

        i'm sending mail using the below function.,

        the function sends the mail but the recipient gets the mail in spam.,

        could anyone help.,

        [code=php]
        <?
        $headers = "From: '$from'" . "\r\n";
        if(mail("exampl e@gmail.com","h i","how r u",$headers)){e cho 'success';}
        ?>
        [/code]

        regards
        vijay.

        Actually unline the other two mentioned, that's no even closely related as having your domain in check.

        Google SPF.

        It will take a while for new domains to have email sent into inbox instead of junk folder.

        But know the basics. Always add a "From" email field as those without it are marked as spam.

        dnsstuff.com used to give you lots of info for free, but now its membership. I've seen their service and it is worth the price, i'm just too cheap. It may be well worth it to have them check MX records etc.

        Cheers,

        Dan

        Comment

        Working...