Html email through vbscript

We using this script for sending emails via SSL. In the workflow, we are setting %af_Comment = %c before the script runs to capture the plain text of the job.
We want %af_Comment to be sent as HTML in body. Can I do this from the script?

Option explicit
Dim MyMsg
Set MyMsg = CreateObject(“CDO.Message” )
SMTPConfig MyMsg, “smtp.gmail.com”, 465, Watch.GetVariable(“username”), Watch.GetVariable(“password”), True
Watch.GetVariable(“password”), True
MyMsg.From = “billing@gmail.com
MyMsg.To = Watch.GetVariable(“af_ToAddress”)
MyMsg.Subject = Watch.GetVariable(“af_Subject”)
MyMsg.TextBody = Watch.GetVariable(“af_Comment”)
MyMsg.Send
Sub SMTPConfig(msg, srv, port, user, pw,useSSL)
Const cdoFieldPrefix = " h t t p ://schemas.microsoft.com/cdo/configuration/"
with msg
.Configuration.Fields.Item (cdoFieldPrefix & “sendusing” ) = 2
.Configuration.Fields.Item (cdoFieldPrefix & “smtpserver” ) = srv
.Configuration.Fields.Item (cdoFieldPrefix & “smtpserverport” ) = port
.Configuration.Fields.Item (cdoFieldPrefix & “sendusername” ) = user
.Configuration.Fields.Item (cdoFieldPrefix & “sendpassword” ) = pw
.Configuration.Fields.Item (cdoFieldPrefix & “smtpauthenticate”) = 1
.Configuration.Fields.Item (cdoFieldPrefix & “smtpusessl”) = useSSL
.Configuration.Fields.Update
end with
end sub

You will find your answer here. :wink: