Page 1 of 1

oMessage.HTMLBODY not working ??

Posted: 2005-05-09 17:19
by tazho
I'm implimenting a DISCLAIMER into my eventhandler.vbs code.

This sub-routine runs in either - onaccept or ondeliver, doesn't seem to make a difference.
It is working perfectly for plain-text messages, but I cannot get it to work with HTMLBody's.

Script Error: Source: Microsoft VBScript runtime error - Error: 800A01C2 - Description: Wrong number of arguments or invalid property assignment: 'oMessage.HTMLBody' - Line: 53 Column: 2 - Code: (null)"


sub disclaimer(oMessage)
dim disclaim
disclaim=false

Dim oRecipients
Set oRecipients = oMessage.Recipients

For i = 0 To oRecipients.Count - 1
If oRecipients(i).IsLocalUser = false Then disclaim = true
next

if disclaim=true then
oMessage.Body=oMessage.Body & vbcrlf & vbcrlf & "----------------" & vbcrlf & "Disclaimer goes here"
'HTMLBOdy Not WOrking.
'if oMessage.HTMLBody <> "" then
' oMessage.HTMLBody = "<br><br>----------------<br>Disclaimer goes here"
' end if
oMessage.Save
end if
end sub

Posted: 2005-05-14 11:15
by martin
Yes, the HTMLBody property is read-only and currently cannot be modified.

Timescale on this one?

Posted: 2005-05-24 17:47
by tazho
Any ideas when this feature will be worked on?

Not pushing u or anything :)



/me bows to the ALMighty.

Posted: 2005-05-24 22:05
by martin
You should add it to the feature requests section of this forum. I won't implement it unless someone adds it as a request..

Posted: 2005-07-25 17:19
by martin
In hMailServer 4.1, the HTMLBody property is read/write.

SUPERSTAR

Posted: 2005-07-28 09:48
by tazho
WHAT CAN YOU SAY.