Hello people, hope everyone is well!

I'm stuck with some Flash ecards I'm building - they use a php script as below to a) save the variables to a text file so they can be loaded up into the received card, b) email the recipient a link to their ecard.

The first part is working fine, and data is being saved to text files - but it does not seem to be sending an email out - and I can't work out why 😕

Looking at the syntax it looks ok to me, but I'm a beginner at all this, any ideas why it's not sending the email?

Thanks for your time,
3stripe

<? 
$CreateEcard = date(U); 
$filename = $CreateEcard.".txt"; 
$ToEmail = $_POST["ToEmail"]; 
$FromEmail = $_POST["FromEmail"]; 
$ToName = $_POST["ToName"]; 
$FromName = $_POST["FromName"]; 
$Greeting = $_POST["Greeting"]; 
$IntroMessage = $_POST["IntroMessage"]; 
$EndMessage = $_POST["EndMessage"]; 
$EcardSelect = $_POST["selected"]; 
$ToName = stripslashes($ToName); 
$FromName = stripslashes($FromName); 
$Greeting = stripslashes($Greeting); 
$IntroMessage = stripslashes($IntroMessage); 
$EndMessage = stripslashes($EndMessage); 
$Today = (date ("l dS of F Y ( h:i:s A )",time())); 
$Created="Ecard Created on $Today"; 
$EcardNum = $EcardSelect; 
$EcardText = "ToName=$ToName&ToEmail=$ToEmail&FromName=$FromName&FromEmail=$FromEmail&Greeting=$Greeting&IntroMessage=$IntroMessage&Created=$Created"; 
$fp = fopen( "./dBText/$filename","w"); 
fwrite($fp, $EcardText, 10000); 
fclose( $fp ); 
######Email Card######## 
## You can change the subject and the message part around. 
## Make sure to change the Link as stated in the Tutorial. 
## (Change from 'someSite' to your actual site - leave the rest the same 
$ToSubject = "You have recieved a Flash Ecard from $FromName"; 
$Message = "$ToName,\nYou have recieved a Flash ecard from $FromName. \nClick the following link to view your card:\n\n http://www.thirdeyedesign.co.uk/beta/gsa160th/SelectCard.php?EcardText=$CreateEcard&ENum=$EcardNum\n\n-----------------------------------\nHere is the message that was sent:\n$ToName,\n$Greeting\n$IntroMessage\n\n-$FromName\n\n\n-----------------------------------\nThis card was sent by James\n\nJust Testing Ecards."; 

mail($ToName." <".$ToEmail.">",$ToSubject, $Message, "From: ".$FromName." <".$FromEmail.">"); 

## This next line returns a success message to the movie. 
print "_root.Status=Success your ecard Has Been Sent!"; 
?>

    UPDATE

    Ok weird, I just got a whole batch of 5 emails through, from ecards I sent this morning, so it seems to be working ok, but with a HUGE time lag on it. Hmm

      Write a Reply...