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);
?>
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);
?>