>> Mailer.BodyText = strMailBody

Should be Mailer.BodyHTML = strMailBody

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Corsair
Sent: Monday, December 13, 2004 2:02 PM
To: [EMAIL PROTECTED]
Subject: [IMail Forum] Sending HTML email from ASP or VB code

I'm attempting to send an HTML-formatted email from a Visual Basic 6.0
module or VBScript on an ASP page using the following code, and can
successfully send text-formatted mail, but if I send it HTML code it
will
send this plain text rather than in HTML format. Can anyone tell me how
to
change the code, or the IMail settings, to send HTML formatted mail?

The various str items, such as strMailBody, are variables receiving
appropriate text up above where this is called.

Thank you,

JB

        Dim Mailer As Object
        Const smtpMailHost = "mydomainname.com"
        ' call mail object
        Set Mailer = CreateObject("SMTPsvg.Mailer")
        Mailer.RemoteHost = smtpMailHost

        ' set up message
        Mailer.FromAddress = strFromEmail
        Mailer.fromName = strFromName
        Mailer.AddRecipient strToName, strToEmail
        If strCCEmail <> "" Then
            Mailer.AddCC strCCName, strCCEmail
        End If

        Mailer.Subject = strSubject
        Mailer.BodyText = strMailBody

        Mailer.SendMail
        Set Mailer = Nothing


To Unsubscribe: http://www.ipswitch.com/support/mailing-lists.html
List Archive:
http://www.mail-archive.com/imail_forum%40list.ipswitch.com/
Knowledge Base/FAQ: http://www.ipswitch.com/support/IMail/

To Unsubscribe: http://www.ipswitch.com/support/mailing-lists.html
List Archive: http://www.mail-archive.com/imail_forum%40list.ipswitch.com/
Knowledge Base/FAQ: http://www.ipswitch.com/support/IMail/

Reply via email to