Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Email with php

Status
Not open for further replies.

dannygoor

IS-IT--Management
Sep 12, 2006
18
US
I have a flash form that is submitting a text field to a php file and then sends it.

Well it looks like it's working ok, it does the process then goes to the next frame, but I never receive the email.

please help.

here is the code:

FLASH FILE:
on (release) {
if (!form.Text192.text.length || form.Text192.text.indexOf("@") == -1 || form.Text192.text.indexOf(".") == -1) {
iError.text = "Please check your e-mail address.";
}else if (!form.Text181.text.length) {
iError.text = "Please enter your first name.";
} else if (!form.Text182.text.length) {
iError.text = "Please enter your last name.";
} else if (!form.Text182a.text.length) {
iError.text = "Please enter your function.";
} else if (!form.Text183.text.length) {
iError.text = "Please enter your organization.";
} else if (!form.Text187.text.length) {
iError.text = "Please enter your city.";
} else if (!form.Text186.text.length) {
iError.text = "Please enter your zip code.";
} else if (!form.Text188.text.length) {
iError.text = "Please enter your country.";
} else if (!form.Text189.text.length) {
iError.text = "Please enter your telephone number.";
} else if (!form.Text195a.text.length) {
iError.text = "Please enter your arrival date.";
} else if (!form.Text195b.text.length) {
iError.text = "Please enter your departure date.";
}
else {

form.iAll.text = "Type : " + irType.text
+ '\r' + "Title : " + irTitle.text
+ '\r' + "First Name : " + form.Text181.text
+ '\r' + "Last Name : " + form.Text182.text
+ '\r' + "Function : " + form.Text182a.text
+ '\r' + "Organization : " + form.Text183.text
+ '\r' + "Street Adr 1 : " + form.Text184.text
+ '\r' + "Street Adr 2 : " + form.Text185.text
+ '\r' + "Zip Code : " + form.Text186.text
+ '\r' + "City : " + form.Text187.text
+ '\r' + "Country : " + form.Text188.text
+ '\r' + "Phone : " + form.Text189.text
+ '\r' + "Alt Phone : " + form.Text190.text
+ '\r' + "Fax : " + form.Text191.text
+ '\r' + "Email : " + form.Text192.text
+ '\r'
+ '\r' + "Additional Contact First Name : " + form.Text193.text
+ '\r' + "Additional Contact Last Name : " + form.Text194.text
+ '\r' + "Additional Contact Phone : " + form.Text195.text
+ '\r' + "Additional Contact Email : " + form.Text196.text
+ '\r'
+ '\r' + "Arrival Date : " + form.Text195a.text
+ '\r' + "Flight Number : " + form.Text195c.text
+ '\r' + "Departure Date : " + form.Text195b.text
+ '\r' + "Flight Number : " + form.Text195d.text
+ '\r' + "Shuttle to the Hotel" + irShuttle.text
+ '\r'
+ '\r' + "Shoulder Program : Informal Meetings" + irMeeting.text
+ '\r' + "Shoulder Program : Stay over the weekend" + irStay.text
;
iError.text = "Submitting Application...";
lineAdapt();
//loadVariablesNum("email.php", 0, "POST");
_root.form.loadVariables("email.php", "POST");
}
}


THE PHP FILE:
<?

$sendTo = "roland.deiser@eclf.org", "paola.bianchi@unicredit.it", "danny@sidechainweb.com";
$subject = "Registration";


$headers = "From: " . $_POST["vFirstName"] ." ". $_POST["vLastName"] . "<" . $_POST["vEmail"] .">\r\n";
// next include a replyto
$headers .= "Reply-To: " . $_POST["vEmail"] . "\r\n";
// often email servers won't allow emails to be sent to
// domains other than their own. The return path here will
// often lift that restriction so, for instance, you could send
// email to a hotmail account. (hosting provider settings may vary)
// technically bounced email is supposed to go to the return-path email
$headers .= "Return-path: " . $_POST["vEmail"];

// now we can add the content of the message to a body variable
$message = $_POST["iAll"];


// once the variables have been defined, they can be included
// in the mail function call which will send you an email
mail($sendTo, $subject, $message, $headers);
?>
 
i had alot of bother with a similar form, have you labelled the vars and the instances correctly in flash?

i put all of my input text fields into a movie clip called "FORM", gave each one an instance name and each one a variable and used the code

on (release) {
form.loadVariables("email.php", "POST");
}

and mine works ok now
 
That's whay I did,
is there any way to debug this?
 
could you upload your .fla file? it will probably be easier to see any problems this way
 
are you sure that the server is configured for mail?

sounds like the most likely problem
 
what do you mean by that?

what settings should I check?
 
all depends on your server and operating system if its on your pc

if its hosted then check with host that php mail is permitted

 
this was working fine up until a week ago,,

I made some changes to the flash file, and it stopped working,

so I assume everything is still ok with it,,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top