Haven't received email message sent from PHP script on my server

Status
Not open for further replies.

optiqwor

New Member
Messages
13
Reaction score
0
Points
1
I've been building a questionnaire and testing it with a PHP code I built for sending the results to my Gmail account once a user submits it and it has been working fine as I've tested it on different sections. Now that the entire questionnaire is complete and I tested it, I haven't received the email yet and it's been over 3 hours since submitting it.

here's the PHP I've been using

PHP:
<?php ini_set('display_errors','on'); ?><?php

$body="";
foreach ($_POST as $key => $value) {
    $body.= str_replace("_"," ",$key).":\n\n ". $value."\n\n\n\n";
}

$from = 'From: Your_New_Client';
$to = 'myemailaccount@gmail.com';
$subject = 'A New Questionnaire';
?>

<?php
if (!isset($_POST['submit'])||($_POST['submit'])) {
    if (mail ($to, $subject, $body, $from)) {
        echo '<p>Your questionnaire has been submitted!  You will be contacted with further assistance once everything is reviewed.</p>';
    } else {
        echo '<p>Something went wrong, go back and try again!</p>';
    }
}
?>

it echos the message indicating it successfully went through so I have no clue as to what the problem is.
 

optiqwor

New Member
Messages
13
Reaction score
0
Points
1
OK I just copied and pasted each section individually into a new html document and sent them one by one just to be sure and they all popped up in my email account. Is there a limit on how much data we can send at one time or something?
 

Dead-i

x10Hosting Support Ninja
Community Support
Messages
6,084
Reaction score
368
Points
83
Hi,

Our mail server automatically scans every email sent to determine whether it is spam. Due to the amount of email abuse we receive on the free hosting service, the spam tests are harsher than what they would usually be. If an email is considered as spam, it is discarded. It looks like a few emails sent from your account were discarded because the contents looked too much like a form for phishing attacks. Please could you try changing the data you're sending in your emails? :)

Thank you,
 

optiqwor

New Member
Messages
13
Reaction score
0
Points
1
Is it possible for you to be more specific? Is it the form itself or is it the information entered into the form that makes it appear phishy?
 
Status
Not open for further replies.
Top