I'm not very familier with PHP scritping so, if s/o could proof this it would be greatly apprectiated.
Goal : send ecards
.txt files are being saved in dBText folder, however no emails are being sent. It may be due to the folder locations. The actual Ecards folder is in the /www folder and the dBText folder is outside the /www
so, it would look like this:
/www/Ecards/Ecards.html
.txt/dBText/www
The txt docs say:
This is what the .txt docs contains:
ToName=&ToEmail=&FromName=&FromEmail=&Greeting=&IntroMessage=&Created=Ecard Created on Monday 10th of February 2003 ( 08:17:36 PM )
PHP:--------------------------------------------------------------------------------
<?
<?
$CreateEcard = date(U);
$filename = $CreateEcard.".txt";
$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 card from $FromName. \nClick the following link to view your card:\n\n <a href="
http://www.khaus.com/Ecards/SelectCard.php4?EcardText=" target="_blank">
http://www.khaus.com/Ecards/SelectCard.php4?EcardText=</a>$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 from <a href="
http://www.flash-db.com/Ecards/\n\nThe" target="_blank">www.flash-db.com/Ecards/\n\nThe</a> Flash-dB Team.";
###################
## This line actually sends the email - you should not have to change this.
mail($ToName." <".$ToEmail.">",$ToSubject, $Message, "From: ".$FromName." <".$FromEmail.">");
## This next line returns a success message to the movie.
print "_root.Status=Success your Card Has Been Sent!";
#### End #########
## By: Jeffrey F. Hill
## <a href="
http://www.flash-db.com" target="_blank">www.flash-db.com</a>
?>