AS3 - php mail help needed - seems impossible to make

Hi everybody, i have been trying fr some days now to make a simple AS3 - php mail to work. i have read many examples and tried most of them but with no luck. the server i use for testing is capable of sending mail, tried with AS2 many times. can someone please help me ?
This is the flash code :

var variables:URLVariables=new URLVariables();
variables.mail=send_str; ( send_str is a string i used to coolect info from text fields )

var request:URLRequest=new URLRequest();
request.url=‘path_to_server_side_script’; ( mail.php )


var loader:URLLoader=new URLLoader();

private function messageSent(evt:Event):void {
var loader:URLLoader=URLLoader(;
var vars:URLVariables=new URLVariables(;
if (vars.answer==“ok”) {
/// mail did not go
} else if (vars.answer==“no”) {
/// mail delivered

and now for the php script :

$body =$_POST[‘mail’];
$subject = "Email from my page >>> ";
$mailbody = iconv ( ‘UTF-8’, ‘ISO-8859-7’, $body );
if (mail(‘[email protected]’, $subject, $mailbody))
echo “answer=ok”;
else {
echo “answer=no”;

it produces all kinds of errors, the most common of which that variables should be in name/value pairs. I have tried to replace loader.dataFormat=URLLoaderDataFormat.VARIABLES; with
loader.dataFormat=URLLoaderDataFormat.TEXT; with no luck.
Also i tried to start the sending_str ( the string that i used to collect info from text field ) with var sending_str:String=“mail=”+name_txt.text+" "+sirname_txt.text; in order to have name/value pairs but with no luck.
if someone understands what is wrong i really need some help with this,