ASPMail Sample Script

ASPMail is installed on each of our web servers and may be used to send mail pro-grammatically. Below is a simple example written in ASP. For more information please see the ASPMail website

Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.FromName   = "Your Full Name"
Mailer.RemoteHost = ""
Mailer.AddRecipient "Recipient Full Name",
Mailer.Subject    = "ASPMail Sample"
Mailer.BodyText   = "This is a sample message sent using ASPMail."
if Mailer.SendMail then
  Response.Write "Mail sent..."
  Response.Write "Mail send failure. Error was " & Mailer.Response
end if

Copy the above to a file in your site called testmail.asp, then using a web browser go to If the page displays "Mail sent..." then the test was successful.

Add Feedback