View Full Version : PHP mail prob...need smart ideas
chevelleman71
04-16-2003, 09:41 PM
Hello, here is my debacle. I am using a simple email form in flash, its one of the ones available in the Movies section of this site. Anyways, it runs perfectly on a professionally hosted webserver, sends me the email with everything in it. However, when i put it on my other webserver (running IIS5, I installed the latest version of PHP today), the script runs, and sends me the email, but there is no content in the email this time!! In both cases, i fill out the flashmx-based form, but i cant get it to send content!!! Does anyone have any ideas?
-Luke
freddycodes
04-17-2003, 05:20 AM
It wiould be tough to tell what is wrong, I suspect something with the implementation in PHP, would you mind posting the PHP code?
chevelleman71
04-17-2003, 04:01 PM
Thanks for responding, here is my php code:
<?
/* ************************************************** *****************************************
*** ***
*** SIMPLE EMAILFORM USING PHP - together with Flash 5 ***
*** ***
*** With this script you can make a simple email form, where the script sends ***
*** the submitted message to your email address. ***
*** ***
*** This is a flash form - it also works in HTML. ***
*** ***
*** Files: formular.fla,formular.swf,formular.html and simple_emailform.php ***
*** ***
*** ***
*** The script is placed in a subfolder called "php" ***
*** ***
*** It's very simple, the script doesn't need a database, but the webserver has to ***
*** support PHP. ***
*** Read the comments in the script. ***
*** ***
*** I cannot answer any questions on PHP, but there«s a lot of friendly people on ***
*** the net! ***
*** ***
*** Commented and manipulated for use in Flash by Lars Bregendahl Bro - www.westend.dk ***
*** ***
************************************************** *****************************************
*/
/* ************************************************** **************************
*** $msg relates to the variables that is placed in the body of the mail ***
************************************************** **************************
*/
$msg = "E-mail sent from my site\n\n";
/* ************************************************** ******************************************
*** The string From Name is written in to the body followd by the variable $sender_name ***
************************************************** ******************************************
*/
$msg .= "From Name: $sender_name\n";
$msg .= "From E-Mail: $sender_email\n";
$msg .= "Telephone: $telephone\n\n";
$msg .= "Message: $message\n\n";
/* ************************************************** ***********
*** \n gives a linebreak - \n\n gives a double linebreak ***
************************************************** ***********
*/
/* ************************************************** **
*** Remember to put in the correct email-adress ***
************************************************** **
*/
$to = "lpatterson@fcni.org";
$subject = "TEST of the simple EmailForm";
/* ************************************************** ******
*** Writes "Sent from my website" in the from-field ***
************************************************** ******
*/
$mailheaders = "Sent from my website \n";
/* ************************************************** ********
*** Writes the senders email in the "Reply-To field" ***
************************************************** ********
*/
$mailheaders .= "Reply-To: $sender_email\n\n";
/* ********************************************
*** Mail Function - executes the script ***
********************************************
*/
mail($to, $subject, $msg, $mailheaders);
?>
freddycodes
04-17-2003, 04:57 PM
The latest version of PHP comes with globals tunred off, meaning you have to specify where the variables are coming from, unlike early versions. It appears your host is using a version of PHP with globals on. I say leave them off, but since it is local testing you are doing and your host has them off. Open your php.ini file. Find the line that says
register_globals Off
Change it to
register_globals On
Restart your webserver.
chevelleman71
04-17-2003, 05:03 PM
freddycodes,
Thank you so much more than i can say, i struggled with this problem for hours yesterday. Your a good person. That fixed the problem!
-Luke
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.