Persits ASPEmail sample code

You can use the SMTP server assigned to your account "mail.yourdomain.com" as the SMTP outgoing server on your web application, please replace yourdomail.com to your own domain name).

Persits ASPEmail sample code:


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

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

Mailer.Host = "mail.yourdomain.com"
Mailer.Username = "[email protected]"
Mailer.Password = "password"
Mailer.FromName = "[email protected]"
Mailer.From= "[email protected]"
Mailer.AddAddress "[email protected]"
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>
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

SQL server- network related or instance-specific error happened while connection establishing

  Instance-specific or network related error happening while connecting to SQL server   Please...

OleDB connection string examples

OleDB connection string examples MS Access (Jet) "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA...

Do you allow custom COM components?

Do you allow custom COM components? We are not offering to install the custom COM components...

Error when accessing a WCF services

Error when accessing a WCF services Error when accessing a WCF service: "IIS specified...

How to cache static contents to client with UseMaxAge?

You can consider to caches static contents to the client with UseMaxAge if your website has too...

Powered by WHMCompleteSolution