JB,
You are actually using a server-side ActiveX component called ASPMail to handle the E-mail. Instructions for this component can be found on the following page:
http://www.serverobjects.com/comp/Aspmail4.htm
You control the content-type with the "ContentType" property. It appears however that you can only set one content-type per message, and you are therefore SOL with this component.
If you are on a Windows 2000 machine, look into using the built-in CDO object for sending E-mail. You can definitely construct a message with both content-types.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cdosys/html/_cdosys_imessage_interface.asp
You can also Google for many other coding examples using "CDO ASP".
Matt
Corsair wrote:
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/
-- ===================================================== MailPure custom filters for Declude JunkMail Pro. http://www.mailpure.com/software/ =====================================================
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/
