# Flash CS3 / PHP Custom Mailer

**URL:** <https://forum.kirupa.com/t/flash-cs3-php-custom-mailer/274519>\
**Category:** Uncategorized\
**Created:** [October 30, 2008, 9:31pm UTC](https://forum.kirupa.com/t/flash-cs3-php-custom-mailer/274519 "2008-10-30T21:31:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![asmithdesigns](https://avatars.discourse-cdn.com/v4/letter/a/b5a626/32.png) [@asmithdesigns](https://forum.kirupa.com/u/asmithdesigns)\
**Post date:** [October 30, 2008, 9:31pm UTC](https://forum.kirupa.com/t/flash-cs3-php-custom-mailer/274519/1 "2008-10-30T21:31:36Z")

</div>

Hello all,

I will try and make this brief… been dealing with it for quite some time. Basically, I have a Flash movie that includes a text field and a submit button. The user will put in their e-mail address and then click submit… which will send them an e-mail.

Everything works fine on [bluehost.com](http://bluehost.com). However, my client needs it to work on [godaddy.com](http://godaddy.com). I have found one interesting thing that might help some of you with this!

Here is the line of code that is attached to my button in flash…

```auto

on (release) {
    form.loadVariables("Pricing_Texts/My_Heaven_Hell_PRICING.php", "POST");
}

```

Here is the PHP file that it is calling…

```auto

<?php

include_once("Mail.php");

$to = $HTTP_POST_VARS['email'];
$subject = "Requested Pricing";
$headers = 'MIME-Version: 1.0' . "
";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "
";
$headers .= 'From: Todd White <pricing@artofwhitegallery.com>' . "
";
$headers .= 'Cc: ' . "
";
$message = "Thank you for your interest! Here is the pricing you requested:

My Heavan & Hell - $1500.00

Please feel free to contact us at 317-379-6340 with any questions!";

if (!preg_match("/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/", $to)) {
  echo "<h4>Invalid email address</h4>";
  echo "<a href='javascript:history.back(1);'>Back</a>";
} elseif ($subject == "") {
  echo "<h4>No subject</h4>";
  echo "<a href='javascript:history.back(1);'>Back</a>";
}

elseif (mail($to,$subject,$message,$headers)) {
  echo "<h4>Thank you for sending email</h4>";
} else {
  echo "<h4>Can't send email to $to</h4>";
}

?>

```

Now, the most interesting thing is this…

When I replace

```auto

$to = $HTTP_POST_VARS['email'];

```

with

```auto

$to = "asmithdesigns@gmail.com";

```

the works great with [godaddy.com](http://godaddy.com). However, when I try and do it the original way… it always shoots back Invalid E-Mail Address.

Like I said before, I know that my original coding works 100% since I have it running on bluehost. It is just that my client needs it working through godaddy.

I have already made sure that I am using Linux hosting on both goddady and bluehost. They are both capable of running the most current versions of php as well.

Does anyone have any ideas?? I am desperate!!

Thanks for your time and concern,

.: andrew
