MailEnable Enterprise Guide
Developers / COM component / Examples
In This Topic
    Examples
    In This Topic

     

    Sending an HTML email from an ASP page

    Copy Code
    <%
    Dim oMail
    Set oMail = server.CreateObject("MEMail.Message")
    oMail.MailFrom = "test@example.com"
    oMail.MailFromDisplayName = "Test Account"
    oMail.UserName = test@example.com
    oMail.Password = "password"
    oMail.ContentType = "text/html;"
    oMail.MailTo = "bob@example.com"
    oMail.Subject = "Welcome to our service"
    oMail.MessageBody = "<html><body><h1>Hello there,<BR>Welcome to our new service.</h1></body></html>"
    oMail.SendMessage
    %>
    

     

    Sending an email with an attachment
    Copy Code
    <%
    Dim oMail
    set oMail = server.CreateObject("MEMail.Message")
    oMail.MailFrom = "test@example.com"
    oMail.MailFromDisplayName = "Update Account"
    oMail.MailTo = "customer@example.com"
    oMail.Attachmentfilename = "c:\documents\updateinfo_14_4.zip"
    oMail.Attachmentname = "updateinfo.zip"
    oMail.Subject = "New update information"
    oMail.MessageBody="Find the new info attached.”
    oMail.SendMessage
    %>