# PHP mailer

**URL:** https://forum.kirupa.com/t/php-mailer/25800
**Category:** flash
**Created:** [July 16, 2003, 4:44pm UTC](https://forum.kirupa.com/t/php-mailer/25800 "2003-07-16T16:44:27Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![elietabet](https://avatars.discourse-cdn.com/v4/letter/e/a9a28c/32.png) [@elietabet](https://forum.kirupa.com/u/elietabet)
#### Post date: [July 16, 2003, 4:44pm UTC](https://forum.kirupa.com/t/php-mailer/25800/1 "2003-07-16T16:44:27Z")

</div>

anyone knows whats wrong with this PHP mailer ??  
i have added it to flash site and it doesnt work, actually does it work with flash or only with HTML ?

---

<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: [July 16, 2003, 6:24pm UTC](https://forum.kirupa.com/t/php-mailer/25800/2 "2003-07-16T18:24:32Z")

</div>

I am at work and only looked at your PHP file. Also don’t know if you mean that and HTML one works but a flash one doesn’t? There’s a couple things in your PHP script that I would do differently like have the mail command seperate from the ending if statement, but I don’t know enough about PHP to see if that’s a problem. Check out this thread, it has a tut on how to make a mailer from flash using PHP:

[http://www.kirupaforum.com/forums/showthread.php?s=&threadid=17623&highlight=email+tutorial](http://www.kirupaforum.com/forums/showthread.php?s=&threadid=17623&highlight=email+tutorial)

It worked for me!!:beam:

---

<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: [July 16, 2003, 6:46pm UTC](https://forum.kirupa.com/t/php-mailer/25800/3 "2003-07-16T18:46:49Z")

</div>

but i need to put this mail form in an MC, not in a HTML page

---

<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: [July 16, 2003, 10:13pm UTC](https://forum.kirupa.com/t/php-mailer/25800/4 "2003-07-16T22:13:22Z")

</div>

I know. You can use that tutorial that I posted; but instead of using a stage in a new flash movie, create a movieClip. I would goto insert\>new symbol\>movieClip - then make your fields with the button on frame one. Just remember if you have any variables printed back to the flash movie, they have to be complete with a path and all:

```php

$result = mail( blah, blah, blah );
if ( $result ){
print "_root.movieClip.statusText=Your email has been sent";
} else {
print "_root.movieClip.statusText=You have had a terrible mishap";
}

```

I have a working fla if you want to see what that tut looks like at the end.  
(-:

---

<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: [July 17, 2003, 10:30am UTC](https://forum.kirupa.com/t/php-mailer/25800/5 "2003-07-17T10:30:42Z")

</div>

can u attach it plz

---

<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: [July 17, 2003, 10:31am UTC](https://forum.kirupa.com/t/php-mailer/25800/6 "2003-07-17T10:31:36Z")

</div>

also, can u check my thread regarding mail form sender ?

---

<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: [July 19, 2003, 8:10pm UTC](https://forum.kirupa.com/t/php-mailer/25800/7 "2003-07-19T20:10:04Z")

</div>

Hey,

Sorry it’s taken me a while to get these to you. I’ve been kinda busy. Here’s the stuff:  
:beam:

Here’s the PHP:

```php

<?PHP
$to = "your_email_address@whatever.com";
$msg = "$name

";
$msg .= "$phone

"; 
$msg .= "$email

"; 
$msg .= "$message

"; 
mail($to, $subject, $msg, "From: My web site
Reply-To: $email
");
?> 

```

If your server doesn’t have global variables on (I think that’s how you say it, I’m learning as I go too) then you have to add this to the beginning:

```php

$name=$_POST["name"];
$phone=$_POST["phone"];
$email=$_POST["email"];
$message=$_POST["message"];

```
