korpela2
May 1st, 2008, 08:10 AM
Hi,
Any help one the following problem would be much appreciated.
Im sending an email through PHP that is triggered by a flash application. The code worked fine until I tried incorporating a random nuber into the email.
My code is:
<?
$numb = rand();
$ToEmail = "---@gmail.com";
##$ToName = "Player 1";
$ToSubject = "Game results";
$ip= $REMOTE_ADDR;
$EmailBody = "Player's Name: $FirstName\nPlayer's Email: $Email\n\nChosen Charity: $ToCharity\nPplayer's IP address: $ip\n\nRedemtion Code: $numb";
$EmailFooter="\nThis message was sent by: ---------. If you feel that you recieved this e-mail by accident please contact me at ---------";
$Message = $EmailBody.$EmailFooter;
mail($ToName." <".$ToEmail.">",$ToSubject, $Message, "From: ".$FirstName." <".$Email.">");
?>
The areas marked with blue are not allowing the email to be sent. The answer is probably simple, but being new to PHP doesn't help me much..
Any help one the following problem would be much appreciated.
Im sending an email through PHP that is triggered by a flash application. The code worked fine until I tried incorporating a random nuber into the email.
My code is:
<?
$numb = rand();
$ToEmail = "---@gmail.com";
##$ToName = "Player 1";
$ToSubject = "Game results";
$ip= $REMOTE_ADDR;
$EmailBody = "Player's Name: $FirstName\nPlayer's Email: $Email\n\nChosen Charity: $ToCharity\nPplayer's IP address: $ip\n\nRedemtion Code: $numb";
$EmailFooter="\nThis message was sent by: ---------. If you feel that you recieved this e-mail by accident please contact me at ---------";
$Message = $EmailBody.$EmailFooter;
mail($ToName." <".$ToEmail.">",$ToSubject, $Message, "From: ".$FirstName." <".$Email.">");
?>
The areas marked with blue are not allowing the email to be sent. The answer is probably simple, but being new to PHP doesn't help me much..