a druga forma, koja prima podatke (SendMail.asp) izgleda ovako:
<%
'declare the variables that will receive the values
'receive the values sent from the form and assign them to variables
'note that request.form("name") will receive the value entered into the textfield
'called name, and so with email and message
Dim DateOfCompletion, PersonCompletingForm, RelationsToChild, ContactPhoneNumber, ContactEmail, ChildsName, ChildsBirthDate,ChildsAddress, EmergencyContact, ChildsDiagnosis, Medications, Precautions, PhysicianName, PhysicianContact, NewMailObj
DateOfCompletion=request.form("txtDate")
PersonCompletingForm=request.form("txtName")
RelationsToChild = Request.Form("txtRelation")
ContactPhoneNumber = Request.Form("txtContactPhone")
ContactEmail = Request.Form("txtMail")
EmergencyContact = Request.Form("txtEmergency")
PhysicianName = Request.Form("txtPhysicianName")
PhysicianContact = Request.Form("txtPhysicianAddress")
ChildsName=request.form("txtChildsName")
ChildsBirthDate=request.form("txtChildsDateOfBirth")
ChildsAddress=request.form("txtChildsAddress")
ChildsDiagnosis=request.form("txtChildsDiagnosis")
Medications=request.form("txtMedications")
Precautions=request.form("txtPrecautions")
'create the mail object and send the details
Set NewMailObj=Server.CreateObject("CDONTS.NewMail")
NewMailObj.From = "
[email protected]"
NewMailObj.To = "
[email protected]"
NewMailObj.Subject = "Questionnaire from your site from :: " & PersonCompletingForm
NewMailObj.Body = "DATE FROM COMPLETED : " & DateOfCompletion & _
"<br>PERSON COMPLETING FORM : " & PersonCompletingForm & _
"<br>RELATIONSHIP TO CHILD :" & RelationsToChild & _
"<br>CONTACT PHONE NUMBER : " & ContactPhoneNumber & _
"<br>CONTACT E-MAIL : " & ContactEmail & _
"<br>CHILD's NAME : " & ChildsName & _
"<br>CHILD's DATE OF BIRTH : " & ChildsBirthDate & _
"<br>CHILD's ADDRESS : " & ChildsAddress & _
"<br>CHILD's DIAGNOSIS : " & ChildsDiagnosis & _
"<br>MEDICATIONS : " & Medications & _
"<br>PRECAUTIONS : " & Precautions & _
"<br>EMERGENCY CONTACT NAME AND NUMBER : " & EmergencyContact & _
"<br>PHYSICIAN NAME, PRACTISE : " & PhysicianName & _
"<br>PHYSICIAN ADDRESS, PHONE NUMBER : " & PhysicianContact
'you need to add the following lines FOR the mail to be sent in HTML format
NewMailObj.BodyFormat = 0
NewMailObj.MailFormat = 0
NewMailObj.Send
'Close the email object and free up resources
Set NewMailObj = nothing
%>