Hoping you guys could help me with this. I have as3 in a fla and I have a php script on my server sending the mail after being sent a variable from flash. I have no difficulty getting this working but the problem is I need it to send to two adresses, one which the user types in a text box with id email_txt and then I wanted to add my email as well so it sent both to the adress the user types in and to mine?
var note:String;
var variables:URLVariables = new URLVariables();
var mailAddress:URLRequest = new URLRequest(“http://www.email.com/email.php”);
send_btn.addEventListener(MouseEvent.CLICK, onSubmit);
function onSubmit(e:Event):void {
variables.sEmail = email_txt.text + “email@gmail.com”;
variables.sMessage = note_txt.text;
variables.sName = “”;
variables.sSend = “Razor”;
note = date_txt.text + "
" + namep_txt.text +"
" + user_txt.text +"
" +hotel_txt.text +"
" +note_txt.text;
variables.sMessage = note;
variables.sSubject = “Rezidor job Form.”
mailAddress.data = variables;
mailAddress.method = URLRequestMethod.POST;
sendToURL(mailAddress);
}
send_btn.addEventListener(MouseEvent.CLICK, onPrint)
<?php
$sendTo = $_POST[“sEmail”];
$subject = $_POST[“sSubject”];
$headers = "From: " . $_POST[“sName”].= “<” . $_POST[“sSend”] . ">
";
$headers .= “<” . $_POST[“email”] . ">
";
$headers .= "Reply-To: " . $_POST[“sEmail”] . "
";
$headers .= "Return-path: " . $_POST[“sEmail”];
$message = $_POST[“sMessage”];
mail($sendTo, $subject, $message, $headers);
mail($sendTo, $subject, $message, $headers);
?>
I’ve tried this and that and nothing seems to work.
I know the problem is somewhere with this line:
variables.sEmail = email_txt.text + “[COLOR=#0066cc]email@gmail.com[/COLOR]”;
I tried changing it to = variables.sEmail = email_txt.text + “[COLOR=#0066cc]email@gmail.com[/COLOR]”;
and
variables.sEmail = “email_txt.text + [COLOR=#0066cc]email@gmail.com[/COLOR]”;
even tried
variables.sEmail = email_txt.text + &[EMAIL=“email@gmail.com”][COLOR=#0066cc]email@gmail.com[/COLOR][/EMAIL];
I have also tried changing the php.
Made a new variable called email2 and introduced it to the php. Nothing seems to work.
Thanks guys for reading.