all groups > flash actionscript > october 2006 >
You're in the

flash actionscript

group:

Why is my ASP formmail not working?


Why is my ASP formmail not working? shush1
10/29/2006 7:25:43 PM
flash actionscript:
Hi i have a form on my flash site, which when submitted using ASP i want it to
send me a email with the form details, but i am not recieving any email and it
sayts there is a error but dnt know why! Can someone please have a look? Really
Urgent, I just dnt know where its going wrong. I got it to work in PHP but then
found out server does not accept PHP.

this is my asp code:

[CODE]


<%
Dim strTo, strFName, strCompany, strEmail, strAddress
Dim objCDOMail 'The CDO object


strTo = "shush@freshlemon.co.uk"
strName = Request.Form("fname")
strCompany = Request.Form("company")
strCompany = Request.Form("email")
strAddress = Request.Form("company")



Set objCDOMail = Server.CreateObject("CDONTS.NewMail")


objCDOMail.From = "yourname"
objCDOMail.To = strTo
objCDOMail.Subject = "Medite Form"
objCDOMail.FName = strName
objCDOMail.Company = strCompany
objCDOMail.Email = strEmail
objCDOMail.Address = strAddress
objCDOMail.Send
Set objCDOMail = Nothing
%>


[/CODE]

this is my flash script which I have on the submit button

AS

on (release) {

form.loadVariables("email.asp", "POST");
form.fname = "";
form.company = "";
form.email = "";
form.address = "";

}

/AS
Re: Why is my ASP formmail not working? flashofscarlet
10/31/2006 12:00:00 AM
I'd suggest u use LoadVars instead of LoadVariables. This way, you will get
more control over

Using LoadVars:
var myRespVars:LoadVars = new LoadVars();
var mySendVars:LoadVars = new LoadVars();
mySendVars.myName = name_txt.text
mySendVars.myEmail = email_txt.text
mySendVars.myCompany = com_txt.text
mySendVars.sendAndLoad("email.asp", myRespVars, "POST");
myRespVars.onLoad = function() {
result = this.result;
};

I would also suggest that you use a Response.write to notify the status -
whether email has been sent/failed - in the ASP page.

AddThis Social Bookmark Button