# Problems With My MX & PHP Mailer

**URL:** <https://forum.kirupa.com/t/problems-with-my-mx-php-mailer/7893>\
**Category:** Uncategorized\
**Created:** [November 9, 2002, 9:46pm UTC](https://forum.kirupa.com/t/problems-with-my-mx-php-mailer/7893 "2002-11-09T21:46:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![RageW0lf](https://avatars.discourse-cdn.com/v4/letter/r/e495f1/32.png) [@RageW0lf](https://forum.kirupa.com/u/RageW0lf)\
**Post date:** [November 9, 2002, 9:46pm UTC](https://forum.kirupa.com/t/problems-with-my-mx-php-mailer/7893/1 "2002-11-09T21:46:44Z")

</div>

I followed a tutorial at Flash kit on how to make a php mailer with MX, and it ddn’t work.

I followed a different one and it didn’t do what I wanted…

I have followed one that somebody suggested, and it doesn’t work… I just seem to have serious problems in this area.

I used MX to create my form, and have used PHP to create the transmission between the 2.

you can see the file at [http://www.innovati0n.com/mail/mail.swf](http://www.innovati0n.com/mail/mail.swf)

it doesn’t send mail, but it does do everything else it should. Its F-ing ugly, I just wanted to get it working funtionally before I try to make it pretty!

Please help, the files are attached!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 10, 2002, 5:06pm UTC](https://forum.kirupa.com/t/problems-with-my-mx-php-mailer/7893/2 "2002-11-10T17:06:14Z")

</div>

I have PHP 4.2 on my server btw.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 10, 2002, 5:50pm UTC](https://forum.kirupa.com/t/problems-with-my-mx-php-mailer/7893/3 "2002-11-10T17:50:11Z")

</div>

Try this script, it should work:

```php
<?
$recipient = "wutever@wutever.com";
unset($HTTP_POST_VARS['onLoad']);
unset($HTTP_POST_VARS['clear']);
$body = "The following information was submitted...

";
foreach($HTTP_POST_VARS as $key => $value) {
	$key = substr($key, 0, -4);
	$body .= "$key: $value
";
}
$from = $HTTP_POST_VARS['name_txt'] . " <" . $HTTP_POST_VARS['email_txt'] . ">";
mail($recipient, $HTTP_POST_VARS['subject_txt'], $body, "From: $from");
?>

```

Hope this helps!

yours,  
h88

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 10, 2002, 8:29pm UTC](https://forum.kirupa.com/t/problems-with-my-mx-php-mailer/7893/4 "2002-11-10T20:29:59Z")

</div>

The script did work exactly how I wanted it to, I know nothing about PHP so thanks for the script.

Just a few queries,

1. why does it only work if the .swf is displayed in a html window?

and

1. in my mail where is says who its from it says “INVALID\_ADDRESS@ .SYNTAX-ERROR.” even if I enter a valid email address… anyway to get rid of that?

2. in the email is says “sub :” then the subject, “fromE” then the from email, if I wanted it to say (for example the full word) “subject:” then the subject, how would I do that or can’t I?

I’m not too bother to be honest, it works and that the main thing but I would be interested to know about the stuff above!

thanks again H88!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 10, 2002, 8:38pm UTC](https://forum.kirupa.com/t/problems-with-my-mx-php-mailer/7893/5 "2002-11-10T20:38:20Z")

</div>

the problem is either from your fla OR ur webserver, this script works fine, and i use it everytime!
