Click to See Complete Forum and Search --> : asp mail setup question


Wallykid
07-08-2003, 12:44 PM
I am a webmaster, so i do not have access or the knowlegde to setup the Mail server for the ASP to for form mail. Currently, there is a form online that is already working, and is it reasonable to assume that if i build another form with mail form feature, will it work? i ask because i did mine, and its not working.

<%
dim stu_name, stu_major, stu_minor, stu_class, stu_intern, stu_fulltime, stu_parttime
stu_name= request.form("Name")
stu_major= request.form("Major")
stu_minor= request.form("Minor")
stu_class= request.form("Class")
if request.form("Jobs_int1")="ON" then
stu_intern="YES"
else
stu_intern="NO"
end if
if request.form("Jobs_int2")="ON" then
stu_fulltime="YES"
else
stu_fulltime="NO"
end if
if request.form("Jobs_int3")="ON" then
stu_parttime="YES"
else
stu_parttime="NO"
end if

Dim MyMail
Set MyMail = CreateObject("CDONTS.NewMAil")
MyMail.From = "email"
MyMail.To = "email"
MyMail.Cc= "email"
MyMail.Bcc= "email"
MyMail.Subject = "subject"
MyMail.BodyFormat = 0
MyMail.MailFormat = 0
MyMail.Importance = 1
MyMail.Body = "Student Name = "& stu_name & "Student Major = " & stu_major & "Student Minor = " & stu_minor & "Student Class = " & stu_class & "Student Internship = " & stu_intern & "Student Fulltime = " & stu_fulltime & "Student Part time = " & stu_parttime
MyMail.Send

Set MyMail = Nothing
%>

Wallykid
07-09-2003, 02:35 PM
Thanks for the reply. One more question

stu_name= request.form("Name")
stu_major= request.form("Major")
stu_minor= request.form("Minor")
stu_class= request.form("Class")

the "Class" is actually "class" in the form, will that prevent it from working?

Wallykid
07-10-2003, 01:46 PM
Thanks dave for your continuous reply even tho you didn't see any errors, and you were right, there are no errors here, however, it was a line of code on top of the page which says

<%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>

and it should be

<%@language="VBscript" Codepage="1252"%>

Thanks, great forum!