Simple ASP

<%@ Language=VBScript %>   <--Tells server Visual basic scrpit is being used
<%

set o = Server.CreateObject("ADISCON.SimpleMail.1")   <--Server Path to create object
o.MailServer = "smtp.netflash.net"   <--Mail Server
o.Sender = Request.Form("email")   <--Pulls field, in this case "email", from form and places it in the "from" field in the e-mails.
o.Recipient = "name@mailbox.com"   <--Mailbox where e-mail will be sent
o.Subject = "Request for Information"   <--Subject of e-mail

o.MessageText = "Request for Info" + Chr(13) + Chr(10) + Chr(10) + "FirstName: " + Request.Form("first") + Chr(13) + Chr(10) + "LastName: " + Request.Form("last")    <--Text in quotes will be printed as is in the e-mail. The request.form("") command draws the info from that specific field in the form and places it after the text. For example, the line "FirstName: " + Request.Form("first") will show "FirstName: (Info from specified field)". The chr() commands are just for spacing purposes.

call o.Send
set o = Nothing

'password = Request.Form("password")   <--Variables used
' fname = request.form("fname")
' lname = request.form("lname")
%>   <--Ends the form action

<html><head><title>Your message has been sent</title>   <--HTML headings
Your Request for Information has been sent!   <--Displayed to person seeing page
</html>   <--ends HTML



Complex ASP

<%@ Language=VBScript %>   <--Tells server Visual Basic Script Being used
<%

if request.form("first")<>"" and request.form("last")<>"" and request.form("emails")<>"" then %>   <--Tells server specified items must be filled in on form

<%
set o = Server.CreateObject("ADISCON.SimpleMail.1")   <--Server path to create object
o.MailServer = "smtp.netflash.net"   <--E-mail server
o.Sender = Request.Form("emails")   <--Pulls field, in this case "email", from form and places it in the "from" field in the e-mails.
o.Recipient = "mailbox@netflash.net"   <--Mailbox for e-mail to go to
o.Subject = "Title"   <--E-Mail subject

o.MessageText = "Request for Information"+Chr(13)+Chr(10) + Chr(10) + "First Name: " + Request.Form("first") + Chr(13) + Chr(10) + "Last Name: " + Request.Form("last")"    <--Text in quotes will be printed as is in the e-mail. The request.form("") command draws the info from that specific field in the form and places it after the text. For example, the line "FirstName: " + Request.Form("first") will show "FirstName: (Info from specified field)". The chr() commands are just for spacing purposes

call o.Send
set o = Nothing

'password = Request.Form("password")   <--Variables
' first: = request.form("first")
' last: =request.form("last")
%>

<html><head><title>Thank You</title></head>   <--HTML Tags
<body>We have received your request and will be getting back to you shortly.   <--Text shown to user
</body></html>   <--End HTML tags

<% else %>   <--Tells server what to do if fields are not properly filled in

<html><head><title>Required Field Error</title>   <--HTML Tags
<body>You Are Missing One or More Required Fields. Please Press "BACK" on Your Browser and Fill Out These Fields!   <--Text displayed to user
</body></html>   <--End tags

<%
end if %>   <--End script