+ Reply to Thread
Results 1 to 4 of 4

Thread: Emails I Send From PHP Script Are Getting Flagged as Spam

  1. #1
    web.chesdivmernmra38 is offline x10Hosting Member web.chesdivmernmra38 is an unknown quantity at this point
    Join Date
    Jul 2010
    Posts
    1

    Emails I Send From PHP Script Are Getting Flagged as Spam

    I'm generating an email from a php script. It gets sent but it gets flagged as spam by the receivers email filter. The script is shown below. I've been making mods to the cPanel Email Authentication but I'm really just guessing on the settings based on the headers I see in the received message. I don't have much experience with this and any suggestions are welcome.

    Thanks,


    <?php
    $to = "web.chesdivmernmra@gmail.com";
    $subject = "A Member Survey Has Been Received";
    $message = "Hello Chesapeake Division Superintendent,

    A member survey form has been made on the website. The survey was authenticated by the applicant. The survey responses from this member are contained in the website database:

    Name:\t\t$row[xFIRST_NAME] $row[xLAST_NAME]
    City/State:\t$row[xCITY]
    County:\t\t$row[xCOUNTY]
    Email:\t\t$row[xEMAIL]
    Scale:\t\t$row[xSCALE]

    Regards,
    Chesapeake Division";
    $message = wordwrap($message,70);
    $headers = 'From: div14mer@web1.vital.x10hosting.com' . "\r\n" . 'Reply-To: div14mer@web1.vital.x10hosting.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion();
    //mail($to, $subject, $message, $headers);
    if (mail($to, $subject, $message, $headers)) {echo ("<p class='regularText'>Message sent to: $to</p>");
    } else {echo ("<p class='regularText'>Message delivery failed to: $to</p>");}
    ?>

  2. #2
    lemon-tree's Avatar
    lemon-tree is offline x10 Minion lemon-tree has a spectacular aura about
    Join Date
    Nov 2007
    Posts
    1,420

    Re: Emails I Send From PHP Script Are Getting Flagged as Spam

    This is a regrettable consequence of allowing mail to be sent on a freely accessible server, inevitably some people are going to abuse it to send spam. Due to the mail servers being shared by all free user on a server, if Google etc class one user's mail as spam then all mail from x10 free users on that server will be categorised as spam.
    It may be possible to setup an external SMTP server to send your mail, for example through a Google mail account. This would mean that the server would not be classed as spam and your email will get through, however, you will have to use the more advanced PHP mail functions rather than the simple mail().

  3. #3
    cybrax's Avatar
    cybrax is offline x10 Elder cybrax is on a distinguished road
    Join Date
    Aug 2009
    Location
    UK
    Posts
    699

    Re: Emails I Send From PHP Script Are Getting Flagged as Spam

    Have a rummage through the tutorial section I do believe there was a solution, complete with cut and paste script.
    The code must flow.
    Project 157: Latest UK Jobs direct to your mobile phone
    New Domain under construction: Lovelogic.net
    home for some new projects that we can't keep here ;)


  4. #4
    callumacrae's Avatar
    callumacrae is offline not alex mac callumacrae is just really nice
    Join Date
    Dec 2007
    Location
    Wellesbourne, England
    Posts
    5,162

    Re: Emails I Send From PHP Script Are Getting Flagged as Spam

    You only solution is to use something like Google Apps to send emails, as their IPs are not blacklisted

    ~Callum
    I can customise your phpBB board. Send me a PM.
    lynxphp - info, tutorials and scripts
    "A forum post should be like a skirt; long enough to cover the subject but short enough to keep things interesting."

+ Reply to Thread

Similar Threads

  1. Spam emails!!!!
    By velden in forum Free Hosting
    Replies: 4
    Last Post: 03-10-2010, 01:55 PM
  2. Sent emails received as spam
    By ins_vaibhav in forum Free Hosting
    Replies: 1
    Last Post: 01-23-2010, 02:58 PM
  3. Emails sent by me landing in spam
    By ah-blabla in forum Free Hosting
    Replies: 9
    Last Post: 09-11-2009, 09:02 PM
  4. Sevrial places reject all my emails due to spam?
    By KainRacure in forum Free Hosting
    Replies: 7
    Last Post: 10-15-2007, 08:50 AM
  5. I think i'm being used to send spam - Please Help!
    By cetutnx1 in forum Free Hosting
    Replies: 7
    Last Post: 05-19-2007, 10:36 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers