# Capture email address from textInput field and send an email to it

**URL:** https://forum.kirupa.com/t/capture-email-address-from-textinput-field-and-send-an-email-to-it/331908
**Category:** Uncategorized
**Created:** [November 22, 2013, 2:10pm UTC](https://forum.kirupa.com/t/capture-email-address-from-textinput-field-and-send-an-email-to-it/331908 "2013-11-22T14:10:10Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Mike8](https://avatars.discourse-cdn.com/v4/letter/m/df788c/32.png) [@Mike8](https://forum.kirupa.com/u/Mike8)
#### Post date: [November 22, 2013, 2:10pm UTC](https://forum.kirupa.com/t/capture-email-address-from-textinput-field-and-send-an-email-to-it/331908/1 "2013-11-22T14:10:10Z")

</div>

Hello

I have a little mini game / app, that basically spins a wheel of fortune when the user clicks and drags the mouse. Once the wheel slows down and stops it displays the resulting prize in a dynamic text box. If the user spins again the dynamic text box is cleared and a new prize is shown depending on the spin result. So far so good.

Now elsewhere I have 3 textInput fields - where I want the user to enter their name, last name and email address.

Here is the catch, I need the SWF to email the result from the dynamic textbox to the email address that is entered into the email text field by the user.

I have found many php / AS3 form solutions that capture some input etc but all the ones I found email to a specific address specified in the PHP file. How can I make it email the email address specified at runtime in the textInput field? Is it possible to make the

$to = [COLOR=#800000]“emailaddress@whatever.com”[/COLOR];

## an actual variable, being the instance name of the textInput field in the FLA?

So basically user enters their name, last name and email address into 3 separate textInput fields.  
He/she spins the wheel, result gets shown in the dynamic text field (instance name : result) AND an email gets sent to the inputted email address, saying the following :

Good day \<name\> \<last name\>,

## \<result\>

Any help would be greatly appreciated.
