Flash-Based SMTP Email Using PHPMail

Hello Everyone,

I have a Flash game program the sends email notifications to winners. It uses server side email capability with the file sendEmail.php.

I am developing a desktop version of this game and want to integrate PHPMail into the program to send emails with SMTP servers like gmail.

My Flash developer works mostly with server side applications and is unable to integrate PHPMail’s SMTP function to send emails from the desktop version.

Does anyone know if this can be done? Here is the current sendEmail.php file:

$user_name = $_POST[‘name’];
$user_number = $_POST[‘number’];
$emailFrom = $_POST[‘email’];
$massage = $_POST[‘msg’];

//to me
$to = "[email protected]";
$subject = ‘Prize Wheel Result’;
$bound_text = “jimmyP123”;
$bound = “–”.$bound_text."
“;
$bound_last = “–”.$bound_text.”–
";

$headers = "From: $emailFrom
“;
$headers .= “MIME-Version: 1.0
"
.“Content-Type: multipart/mixed; boundary=”$bound_text””;

$message .= "If you can see this MIME than your client doesn’t accept MIME types!
"
.$bound;

$message .= "Content-Type: text/html; charset=“charset=utf-8”
"
."Content-Transfer-Encoding: 8bit

"
."<b>User Name : </b>".$user_name."<br />
"
."<b>Member Number : </b>".$user_number."<br />
"
."<b>Email : </b>".$emailFrom."<br />
"
."<b>Prize Result : </b>".$massage."<br />
"
.$bound_last;

//for customer
$subject2 = ‘Prize Wheel Result’;
$bound1_text = “jimmyP123”;
$bound1 = “–”.$bound1_text."
“;
$bound1_last = “–”.$bound1_text.”–
";

$header2 = "From: [email protected]
Reply-To: [email protected]
“;
$header2 .= “MIME-Version: 1.0
"
.“Content-Type: multipart/mixed; boundary=”$bound_text””;

$body2 .= "If you can see this MIME than your client doesn’t accept MIME types!
"
.$bound1;

$body2 .= "Content-Type: text/html; charset=“charset=utf-8”
"
."Content-Transfer-Encoding: 8bit

"
."<b>User Name : </b>".$user_name."<br />
"
."<b>Member Number : </b>".$user_number."<br />
"
."<b>Prize Result : </b>".$massage."<br />
"
.$bound1_last;

if(mail($to, $subject, $message, $headers) && mail($emailFrom, $subject2, $body2, $header2))
{
echo ( “result=Successful” );
} else {
echo ( “result=Unsuccessful” );
}

?>

Does anyone here know if this code can be modified to use the SMTP function in PHPMail? Or can anyone point me to where I might find the answer to this problem?

Thank you for any help.