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 = "" ' local host if not authenticating
Mail.From = "" ' Specify sender's address

Mail.FromName = "Sales Department" ' Specify sender's name
Mail.AddAddress "", "Andrew Johnson, Jr."
Mail.AddAddress "" ' Name is optional

Mail.AddReplyTo ""
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