Persits ASPEmail sample code
| <html> |
| <head> |
| </head> |
| <body> |
| <% |
| |
| Set Mailer = Server.CreateObject("Persits.MailSender") |
| |
| Mailer.Host = "mail.mydomain.com" |
| Mailer.Username = "postmaster@mydomain.com" |
| Mailer.Password = "password" |
| Mailer.FromName = "postmaster@mydomain.com" |
| Mailer.From= "postmaster@mydomain.com" |
| Mailer.AddAddress "postmaster@mydomain.com" |
| Mailer.Subject = "This is a sample email sent from Persits 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> |
If you run in to problems using this code, please post in our
community forum. Technical
support cannot assist with specific coding related issues.
Article ID: 683, Created On: 8/25/2009, Modified: 4/21/2011