Sending Email with PHP

Here is my php script in ‘email.php’


<?php
    require("class.phpmailer.php");
    $mail = new PHPMailer();$mail = new PHPMailer();
    $mail->CharSet ="utf-8"; // You can adjust the Charset according to your language
    $mail->IsSMTP();
    $mail->Host = "mail.xxxxx.com";
    $mail->From="[email protected]"; //REMEMBER, this MUST be same as your authorization email address above.
    $mail->FromName="($_POST['body'])";
    $mail->SMTPAuth = true;
    $mail->Username = "[email protected]";
    $mail->Password = "xxxxxxxx";

    $mail->AddAddress("[email protected]");
    $mail->Subject = ($_POST['sender']);
    $mail->Body = "($_POST['email'])";

    if(!$mail->Send())
    {
       echo "Error sending: " . $mail->ErrorInfo;;
    }
    else
    {
       echo "Letter is sent";
    }
?>

Here is my actionscript.


this.stop();

sendBtn.addEventListener(MouseEvent.CLICK, sendEmail);

function sendEmail(MouseEvent:Event):void
{
    var variables:URLVariables=new URLVariables();
    variables.sender=formMC.sender.text;
    variables.email=formMC.email.text;
    variables.body=formMC.body.text;
    
    var request:URLRequest=new URLRequest();
    request.url='email.php';
    request.method=URLRequestMethod.POST;
    request.data=variables;
    
    var loader:URLLoader=new URLLoader();
    loader.dataFormat=URLLoaderDataFormat.VARIABLES;
    loader.addEventListener(Event.COMPLETE,messageSent);
    try 
    {
        loader.load(request);
    } 
    catch (error:Error) 
    {
        trace('Unable to load requested document.');
    }
    
}

function messageSent(evt:Event):void
{
    var loader:URLLoader=URLLoader(evt.target);
    var vars:URLVariables=new URLVariables(loader.data);
    if(vars.answer=="ok")
        trace("The message has been sent");
    else
        trace("Something wrong");
}

A few things to keep in mind. The php script works fine when I populate the variables with text, and run the script. I receive email.
When I run it from my flash movie, no email is sent.

Any thoughts?