# Sending email over ASP (POST method)

**URL:** <https://forum.kirupa.com/t/sending-email-over-asp-post-method/288110>\
**Category:** flash\
**Created:** [May 11, 2009, 12:24pm UTC](https://forum.kirupa.com/t/sending-email-over-asp-post-method/288110 "2009-05-11T12:24:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dianchy](https://avatars.discourse-cdn.com/v4/letter/d/7c8e57/32.png) [@dianchy](https://forum.kirupa.com/u/dianchy)\
**Post date:** [May 11, 2009, 12:24pm UTC](https://forum.kirupa.com/t/sending-email-over-asp-post-method/288110/1 "2009-05-11T12:24:28Z")

</div>

I have a problem with sending email from a flash contact form using ASP. I’m trying to send data to ASP with the POST method, and then send an e-mail using ASP code, but it doesn’t work. In fact, when pressing the submit button in a Flash contact form, in IExplorer nothing happens, and in Mozilla I get a message Waiting for …

This a Flash button code:  
on (release) {  
this.gotoAndPlay(“release”);  
var formName = \_parent.form\_mc.name;  
var formCompany = \_parent.form\_mc.company;  
var formEmail = \_parent.form\_mc.email;  
var formMessage = \_parent.form\_mc.message;  
if (formName != undefined && formEmail != undefined && formMessage != undefined) {  
\_parent.form\_mc.loadVariables (“mail.asp”, 0, vars=POST)  
\_parent.submit = true;  
} else {  
\_global.stickyName = formName;  
\_global.stickyCompany = formCompany;  
\_global.stickyEmail = formEmail;  
\_global.stickyMessage = formMessage;  
\_parent.error = true;  
\_parent.submit = false;  
\_parent.gotoAndPlay(“error”);  
}  
}

and this is the mail.asp code:

\<%  
Dim formName, formCompany, formEmail, formMessage

formName=request.form(“formName”)  
formCompany=request.form(“formCompany”)  
formEmail=request.form(“formEmail”)  
formMessage=request.form(“formMessage”)

Set myMail=CreateObject(“CDO.Message”)  
myMail.Subject=formMessage  
myMail.From=formEmail  
[myMail.To="test@netuse.com](mailto:myMail.To=%22test@netuse.com)"

myMail.Configuration.Fields.Item \_  
(“[http://schemas.microsoft.com/cdo/configuration/sendusing](http://schemas.microsoft.com/cdo/configuration/sendusing)”)=2  
'Name or IP of remote SMTP server  
myMail.Configuration.Fields.Item \_  
(“[http://schemas.microsoft.com/cdo/configuration/smtpserver](http://schemas.microsoft.com/cdo/configuration/smtpserver)”) \_  
=“[mail.netuse.com](http://mail.netuse.com)”  
'Server port  
myMail.Configuration.Fields.Item \_  
(“[http://schemas.microsoft.com/cdo/configuration/smtpserverport](http://schemas.microsoft.com/cdo/configuration/smtpserverport)”) \_  
=25  
myMail.Configuration.Fields.Update  
myMail.Send  
set myMail=nothing  
%\>

and this is the HTML code:

\<html xmlns=“[http://www.w3.org/1999/xhtml](http://www.w3.org/1999/xhtml)” xml:lang=“en” lang=“en”\>  
\<head\>  
\<meta http-equiv=“Content-Type” content=“text/html; charset=iso-8859-2” /\>  
\<title\>6\</title\>  
\</head\>  
\<body bgcolor="#0066ff"\>

\<object classid=“clsid:d27cdb6e-ae6d-11cf-96b8-444553540000” codebase=“[http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0](http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0)” width=“520” height=“500” id=“6” align=“middle”\>  
\<param name=“allowScriptAccess” value=“sameDomain” /\>  
\<param name=“movie” value=“6.swf” /\>\<param name=“quality” value=“high” /\>\<param name=“bgcolor” value="#0066ff" /\>\<embed src=“6.swf” quality=“high” bgcolor="#0066ff" width=“520” height=“500” name=“6” align=“middle” allowScriptAccess=“sameDomain” type=“application/x-shockwave-flash” pluginspage=“[http://www.macromedia.com/go/getflashplayer](http://www.macromedia.com/go/getflashplayer)” /\>  
\</object\>  
\</body\>  
\</html\>

Does anyone have an idea what might be the problem? I have the code uploaded on colleagues’ computer on which sending emails through HTML+ASP works perfectly.

Thank you very much in advance
