Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending Mail In Flash/ASP on Windows 2003 Server

Status
Not open for further replies.

stubbs004

IS-IT--Management
Jan 28, 2005
5
0
0
US
Hello,

I cant seem to get this script to work to send out an email for the contact us form for the following is the code on my button to submit

on (release) {

//Goto Webpage Behavior
getURL("contactmail.asp","_blank", "GET");
//End Behavior

}

and here is the asp script:

<%
Subject = Request.form("contactSubject")
Email = Request.form("contactEmail")
ContactName = Request.form("contactName")
ToComments = Request.form("contactMessage")

strName = "The Harty House Doctor"
strEmail = "danhaydenjr@gmail.com"

strSubject = Subject
strBody = ContactName & ToComments


Set objErrMail= Server.CreateObject("CDO.Message")
With objErrMail
.From = Email
.To = strEmail
.Subject = strSubject
.HTMLBody = CStr("" & strBody)
.Configuration.Fields.Item (" = 2
.Configuration.Fields.Item(" = "localhost"
.Configuration.Fields.Item(" = 25
.Configuration.Fields.Update
On Error Resume Next
.Send
End With

If Err.Number <> 0 Then
Response.Write "_root.Mail.EmailStatus=Failure - Your mail was not sent -" & error
Response.Write Mailer.Response
else
Response.Write "_root.Mail.EmailStatus=Complete - Your mail has been sent"
End If
On Error Goto 0

%>


What could be wrong here? does anyone know? Please help me out. thank you.

dan
 
You are sending the variables by "GET". Your ASP should be request.querystring("contactSubject").

Alternatively you could change your action to "POST".

Hope it helps.

Wow JT that almost looked like you knew what you were doing!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top