# PHP script problems with flash form. HELP!

**URL:** <https://forum.kirupa.com/t/php-script-problems-with-flash-form-help/148162>\
**Category:** Uncategorized\
**Created:** [May 17, 2005, 2:30pm UTC](https://forum.kirupa.com/t/php-script-problems-with-flash-form-help/148162 "2005-05-17T14:30:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jcwilde1](https://avatars.discourse-cdn.com/v4/letter/j/46a35a/32.png) [@jcwilde1](https://forum.kirupa.com/u/jcwilde1)\
**Post date:** [May 17, 2005, 2:30pm UTC](https://forum.kirupa.com/t/php-script-problems-with-flash-form-help/148162/1 "2005-05-17T14:30:41Z")

</div>

I have been trying to get various flash emailer forms to work on my server but I recently found out that my hosting server will not allow annonomus emails so they gave me a php script to work with. I don’t know php and cannot get it to work for me.

\<?  
include\_once(“Mail\Mail.php”);

$recipients = “mail\_to@domain.mail”;

$headers[“From”] = “mail\_from@domain.mail”;  
$headers[“To”] = “mail\_to@domain.mail”;  
$headers[“Subject”] = “Test message”;

$body = “TEST MESSAGE!!!”;

$params[“host”] = “[smtp.websoon.com](http://smtp.websoon.com)”;  
$params[“port”] = “25”;  
$params[“auth”] = true;  
$params[“username”] = "account@domainHosted.com";  
$params[“password”] = “password”;

// Create the mail object using the Mail::factory method  
$mail\_object =& Mail::factory(“smtp”, $params);

$mail\_object-\>send($recipients, $headers, $body);

echo “Email sent.”  
?\>  
My flash file has the variables Name, Email and Message  
posting to the file email.php. Asside from changing the  
username and password what else do I have to change in this to  
get the PHP to work.
