Persits ASPEmail Sample code

Code Sample

<html>
<head>
</head>
<body>
<%

Set Mailer = Server.CreateObject("Persits.MailSender")

Mailer.Host = "localhost"
Mailer.FromName   = "DiscountASP"
Mailer.From= "you@YourHostedDomainName.com"
Mailer.AddAddress "Someone@somewhere.com"
Mailer.Subject    = "This is a sample email sent from ASPEMail"
Mailer.Body   = "Congratulation" & VbCrLf & "If you receive this is, your mail component works"

' catch errors
On Error Resume Next

Mailer.Send

If Err <> 0 Then ' error occurred
      Response.Write "Mail send failure. Error was " & Err.Description
else
     Response.Write "Mail sent..."
End If

%>
</body>
</html>

Article ID: 120, Created On: 11/6/2008, Modified: 4/22/2011