Using ASPEmail to Send Form Results

This example shows the use of ASPEmail to send the results of a form to an email reciepient.  To use this example, create an active server page (a page that ends with a .asp extension) and customize the information so that its specific to your account.  The content of the message being sent is defined in the Mail.Body statement where you format the message using a combination of text, line spacing characters, and fields from your form (if you need them) using Request.Form("fieldname") values, where "fieldname" is the name of fields on your form.

----------  code starts below here ---------

<%

Set Mail = Server.CreateObject("Persits.MailSender")
Mail.Host = "127.0.0.1" ' local host if not authenticating
Mail.From = "sales@yourdomain.com" ' Specify sender's address

Mail.FromName = "Sales Department" ' Specify sender's name
Mail.AddAddress "andy@andrewscompany.net", "Andrew Johnson, Jr."
Mail.AddAddress "paul@paulscompany.com" ' Name is optional

Mail.AddReplyTo "info@yourdomain.com"
Mail.Subject = "Thanks for ordering our hot cakes!"
Mail.Body = "Dear " & Request.Form("FirstName") & ":" & Chr(13) & Chr(10) & _
     "Thank you for your business."

On Error Resume Next

Mail.Send 'this actually sends the email

If Err <> 0 Then
   Response.Write "Error encountered: " & Err.Description
End If

%>

----------  code ends above here ---------

If you have further question or problems, please visit the Persits website Manual for this component, or email us at support@infoquest.com.