View Full Version : php mail() function not working at all
canada_eh
01-10-2004, 01:23 PM
I've seen this posted elsewhere but haven't seen a specific answer anywhere. Is the mail() function working or not? I can't get mine to work at all....does anybody have a suggestions as to another way of sending mail for now?
I've even used a downloaded script because I thought I might be coding something wrong, but even it doesn't work.
SnakEyez
01-10-2004, 01:28 PM
Do you mind posting the code that you have used just to make sure there are no errors with it?
And what errors have you received from the script when it is not working?
canada_eh
01-10-2004, 02:07 PM
<?php
if ($send){
$message1 = $gun;
mail('audi_tt_@hotmail.com', 'New User', $message1);
}
?>
<FORM METHOD="POST" ACTION="index3.php" ENCTYPE="text/plain">
<center><table border="5" bordercolor="white" bgcolor="white" cellpadding="4" cellspacing="3"><tr>
<td valign="top" bgcolor="#C8C8C8"><?php echo $gamertag; ?> </td></tr>
<tr><td valign="top" bgcolor="#C8C8C8"><?php echo $pword; ?> </td></tr>
<tr><td valign="top" bgcolor="#C8C8C8"><?php echo $email; ?> </td></tr>
<tr><td valign="top" bgcolor="#C8C8C8"><?php echo $gun; ?> </td></tr>
<tr bgcolor="#c8c8c8"><td align="right"><INPUT NAME="send" TYPE="submit" VALUE="Confirm" STYLE="border-style:solid; border-color:black; color:white; background-color:red; font-weight:bold"></td></tr></table>
All the $gamertag/pword/email/gun were sent to this page via the POST method on a previous page, and show up fine on the page where I've used "echo" with them.
Any help with this problem would be appreciated, and thanks in advance. (i'm new at this so-called php stuff)
How about trying:<?php
$send = $_POST['send'];
if ($send){
$message1 = $gun;
mail('audi_tt_@hotmail.com', 'New User', $message1);
}?>
canada_eh
01-10-2004, 03:28 PM
I tried your suggestion - still not working for some reason. :(
If you go Here (www.angelfire.com/games5/mm3gametypes/mailproblem.zip) I've put up a .zip file with the three .php files I'm using for this mail. Maybe it would be easier for you to try to figure out what's going on.
Do a little testing: <?php
$send = $_POST['send'];
echo "send before if: $send"; //confirms the value of $send
if ($send){
echo "send after if: $send"; //will only print if you are passing the if test.
$message1 = $gun;
mail('audi_tt_@hotmail.com', 'New User', $message1);
}?>
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.