|
ASPMail Sample Script
ASPMail is installed on each of our web servers and may be used
to send mail programmatically. 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.FromAddress= yourname@yourdomain.com
Mailer.RemoteHost
= "yourdomain.com"
Mailer.AddRecipient "Recipient Full Name", recipient@theirdomain.com
Mailer.Subject
= "ASPMail Sample"
Mailer.BodyText = "This is a sample message sent using
ASPMail."
if Mailer.SendMail then
Response.Write "Mail
sent..."
else
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
http://www.yourdomain.com/testmail. If the page displays " Mail sent..." then the test was successful.
|