Page 1 of 1

php mail problems on new server

Posted: Thu Oct 21, 2004 5:01 am
by deras
i have a php mail script (shown below) which works fine on my old server but does not work on my new server. it seems to work (no errors, says mail sent), but i never get the emails (when i test it). so i am wondering if my php install is missing something. any ideas?

Code: Select all

<p></p> 
    <div align="center"> 
<?php 
if($submit){ 
$to="nnnn@nnnnn.com"; 
$from="From:$from"; 
$message ="comment"; 

mail($to,$subject,$message,$from); 
echo "Mail sent to $to<br>"; 
                 

echo "<br><br><br><br>"; 

exit; 
        } 

?> 
     
        <form action=email2.php method=post> 
        <table cellspacing=2 cellpadding=4 width="60%"> 
            <tr> 
                <td class=field>Subject:</td> 
                <td class=value><input type=text name=subject value="site suggestions/comments" size=60></td> 
            </tr> 
            <tr> 
                <td class=field>From:</td> 
                <td class=value><input type=text name=from value="<?php echo $session[email];?>" size=60><?php echo $useremail;?></td> 
            </tr> 
            <tr> 
                <td class=field>To: SimilarMinds</td> 
                <td class=value> 
                     
                </td> 
            </tr> 
             
            <tr> 
                <td class=field>Message<br> 
                    Text:</td> 
<td class=value><textarea name=message rows=4 cols=55> 
</textarea> 
                </td> 
            </tr> 
        </table> 
        <p><input type="submit" name="submit" value="Send"></p> 
    </form> 
    </div>

Posted: Thu Oct 21, 2004 5:06 am
by ol4pr0
you check junk mail ?

Posted: Thu Oct 21, 2004 4:12 pm
by rehfeld

Code: Select all

if (mail($to,$subject,$message,$from)) {
    echo 'mailed';
} else {
    echo 'not mailed';
}

Posted: Thu Oct 21, 2004 6:53 pm
by feyd
do not disable bbCode if you post code