Hello,
I’ve built a form to send a few pieces of information to my email. I was having issues getting it to even send the email.
Finally got that taken care of, but now realize it isn’t sending any information at all. It’s as if its running the script without grabbing any variables.
status.visible = false;
stop();
cb2.rowCount = 10;
cb2.addEventListener(Event.CHANGE, roomselect);
function roomselect(event:Event):void{
gotoAndStop(cb2.value);
}
send_btn.addEventListener(MouseEvent.CLICK, sendActions);
function sendActions(ev:MouseEvent):void
{
var urlLoader:URLLoader = new URLLoader(request);
var vars:URLVariables = new URLVariables();
var request:URLRequest = new URLRequest("PHP FILE");
urlLoader.dataFormat = URLLoaderDataFormat.TEXT;
request.method = URLRequestMethod.POST;
// these depend on what names the script expects
vars.email_address = email.text;
vars.fname = fname.text;
vars.lname = lname.text;
vars.facility = cb2.value;
vars.dura = duration.text;
vars.phone = phone.text;
vars.organization = organization.text;
vars.dates = date.text;
vars.hotelrooms = hotel.text;
vars.message_body = specifications.text;
request.data = vars;
urlLoader.load(request)
}
<?php
$facility = $_POST['facility'];
$first = $_POST['fname'];
$last = $_POST['lname'];
$duration = $_POST['dura'];
$email_address = $_POST['email_address'];
$phone = $_POST['phone'];
$organization = $_POST['organization'];
$dates = $_POST['dates'];
$message_body = $_POST['message_body'];
$hotelrooms = $_POST['hotelrooms'];
$message = "<b>First Name:</b> $first<br />".
"<b>Last Name:</b> $last<br /><br />".
"<b>Facility:</b> $facility<br /><br />".
"<b>Duration:</b> $duration<br />".
"<b>Email Address:</b> $email_address<br />".
"<b>Phone: </b> $phone<br />".
"<b>Organization:</b> $organization<br /><br />".
"<b>Dates:</b> $dates<br />".
"<b>Hotel Rooms:</b> $hotelrooms <br />".
"<b>Message:</b> $message_body<br />";
$headers = "From: $s_email
Reply-To: $s_email
Content-Type: text/html
";
$subject = 'Emaill';
$to = "tmills@saulttribe.net";
if (! mail($to, $subject, $content, $headers)) {
header('Location: /players-club/direct-mail-via-email/unsuccessfull');
} else {
header('Location: /players-club/direct-mail-via-email/email');
}
echo "SENT";
?>
Here are both files. I just can’t seem to figure this out as to why it’s not sending any info at all.
Thanks