Knowledgebase
Using aspSmart SmartMail
Posted by Paul Woodland (Import) on 02 December 2006 04:35 AM

aspSmart SmartMail is a server-side component that can be used to send emails from our mail servers. You will first need to enable Script Mail on your website so that you can send emails out via our SMTP server using the username and password that will be assigned to you. For detials on this, please see this article:https://support.liquidsix.com/index.php?/Knowledgebase/Article/View/89/0/introduction-to-script-mail 

How do you use aspSmart SmartMail?
The following is an example of using the SmartMail component to send a simple email:

    <%
        'Create an instance of our SmartMail object.
        Set mailObj = Server.CreateObject("aspSmartMail.SmartMail")

        'Configure our test email.
        mailObj.Server = "uk.scriptmail.yourwebservers.com"
        mailObj.Username = "YOUR SCRIPT MAIL USERNAME"
        mailObj.Password = "YOUR SCRIPT MAIL PASSWORD"
  

        mailObj.SenderAddress = "you@yourdomain.com"
        mailObj.SenderName = "Your Name"
       
        mailObj.Subject = "This is a test email"
        mailObj.Body = "This test email is using aspSmartMail SmartMail to send email with LiquidSix Hosting"

        'Add a recipient address.
        mailObj.Recipients.Add "target@targetdomain.com", "Target User"

        'We need to catch the error.
        On Error Resume Next
        mailObj.SendMail
        If (Err <> 0) Then
            Response.Write "There was an error sending the email: " & Err.Description
        End If
    %>

(318 vote(s))
Helpful
Not helpful

Comments (0)