# AS2 Flash EMAIL FORM using ASP

**URL:** <https://forum.kirupa.com/t/as2-flash-email-form-using-asp/284787>\
**Category:** flash\
**Created:** [March 23, 2009, 5:35pm UTC](https://forum.kirupa.com/t/as2-flash-email-form-using-asp/284787 "2009-03-23T17:35:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dan008](https://avatars.discourse-cdn.com/v4/letter/d/90db22/32.png) [@Dan008](https://forum.kirupa.com/u/Dan008)\
**Post date:** [March 23, 2009, 5:35pm UTC](https://forum.kirupa.com/t/as2-flash-email-form-using-asp/284787/1 "2009-03-23T17:35:40Z")

</div>

hi guys,

i am doing a flash based site with a email form using ASP as my server only allow ASP.

I have tried many fla files but couldn’t get it work. Anyone here can kindly share their ASP script and the fla files as sample?

* * *

FLASH AC2:

on (release) {  
if (!Email.length || Email.indexOf("@") == -1 || Email.indexOf(".") == -1) {  
EmailStatus = “Please enter a valid E-mail address”;  
}

```
else if (!Name.length) {
	EmailStatus = "Please Enter the name of how you are sending this to";
} 

else if (!ToComments.length) {
	EmailStatus = "Please enter some text in you message";
} 

else {
	loadVariablesNum ("ASPMail.asp", "0", "Post");
    EmailStatus = "Sending... one Moment .. or two.. sometimes it's faster then other times";
}

```

* * *

ASP SCRIPT:

\<%  
Name = Request.form(“Name”)  
Email = Request.form(“Email”)  
ToComments = Request.form(“ToComments”)

strName = “Your Name”  
strEmail = "Email@ABCDEFGH.com"

strSubject = “Email”  
strBody = To Comments About & Company

Set Mailer = Server.CreateObject(“Persits.MailSender”)  
Mailer.RemoteHost = “[mymail.yahoo.com](http://mymail.yahoo.com)”  
Mailer.FromName = Name  
Mailer.FromAddress = Email  
Mailer.AddRecipient strName, strEmail  
Mailer.Subject = (strSubject)  
Mailer.BodyText = strBody

if Mailer.SendMail then  
Response.Write “\_root.Mail.EmailStatus=Complete - Your mail has been sent”  
else  
Response.Write “\_root.Mail.EmailStatus=Failure - Your mail was not sent - errors”  
Response.Write Mailer.Response  
end if  
%\>

* * *
