Windows Support Manual

ASPEmail

Using the ASPEMail script is a very straightforward process. All you need do is specify a page on your web site as the "action" page for your form, and then include the script on that page.

Each form on your website will consist of 2 pages: A "form" page which actually holds your form, and an "action" page which processes your form when someone clicks on the "submit" button. For purposes of this discussion, we will refer to these pages as "form.html" and "aspmailform.asp". *

Your action page have a extension, even though it is an ordinary HTML file.

Once you have constructed your form using regular HTML make sure that your <form> tag specifies the "post" method, and that the action statement points to your "action" page. Example:

Then, on your action page (aspmailform.asp) you will need to add a block of code similar to the one below:

<%

Set Mail = Server.CreateObject("Persits.MailSender")
Mail.Host = "smtp.smtp-server.com" ' Specify a valid SMTP server
Mail.From = "sales@veryhotcakes.com" ' Specify sender's address
Mail.FromName = "VeryHotCakes Sales" ' Specify sender's name
Mail.AddAddress "andy@andrewscompany.net", "Andrew Johnson, Jr."
Mail.AddAddress "paul@paulscompany.com" ' Name is optional
Mail.AddReplyTo "info@veryhotcakes.com"
Mail.AddAttachment "c:\images\cakes.gif"
Mail.Subject = "Thanks for ordering our hot cakes!"
Mail.Body = "Dear Sir:" & Chr(13) & Chr(10) & _ "Thank you for your business." On Error Resume Next
Mail.Send If Err <> 0 Then Response.Write "Error encountered: " & Err.Description End If

%>