Sending E-Mail using ASPEmail

There are other options to sending e-mail from an ASP page other than using CDONTS , one of the most popular is using the ASPmail component from persits .

Here is the code for our example

<%
'declare our variables
Dim mail
'create an instance of the object
Set mail = Server.CreateObject("Persits.MailSender")
'this is your smtp server
mail.Host = "smtp.mymailserver.com"
'this is the senders email address
mail.From = "myemail@emailaddress.com"
'this is the senders name
mail.FromName = "bill"
'recipients email address
mail.AddAddress = "youraddress@email.com"
'subject of this message is
mail.Subject = "make millions from your computer (not)"
'the body of your message goes here
mail.Body = "another get rich scam for you to delete "
'send the email
mail.Send
'good practice
Set mail = Nothing
%>

 

Sponsors