Knowledgebase: ASP Components
Using Dimac w3 JMail
Posted by Paul Woodland (Import) on 02 December 2006 04:35 AM

Dimac w3 JMail 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 Dimac w3 JMail?
The following is an example of using the JMail component to send a simple email:

    <%

'Create an instance of our JMail object.       
Set mailObj = Server.CreateObject("JMail.Message")

'Configure our test email.
mailObj.MailServerUserName = "SCRIPTMAILUSERNAME"
mailObj.MailServerPassword = "SCRIPTMAILPASSWORD"
mailObj.From = "you@yourdomain.com"
mailObj.FromName = "Your Name"        

    mailObj.Subject = "This is a test email"
    mailObj.Body = "This test email is using Dimac w3 JMail to send email with LiquidSix Hosting"

'Add a recipient address.       
mailObj.AddRecipient "target@targetdomain.com"

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

    %>

(341 vote(s))
Helpful
Not helpful

Comments (0)