Use this forum if you have problems with a hMailServer script, such as hMailServer WebAdmin or code in an event handler.
-
tazho
- Normal user

- Posts: 53
- Joined: 2005-04-04 18:05
- Location: South Shields
-
Contact:
Post
by tazho » 2005-05-09 17:19
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
-
martin
- Developer

- Posts: 6837
- Joined: 2003-11-21 01:09
- Location: Sweden
-
Contact:
Post
by martin » 2005-05-14 11:15
Yes, the HTMLBody property is read-only and currently cannot be modified.
-
tazho
- Normal user

- Posts: 53
- Joined: 2005-04-04 18:05
- Location: South Shields
-
Contact:
Post
by tazho » 2005-05-24 17:47
Any ideas when this feature will be worked on?
Not pushing u or anything
/me bows to the ALMighty.
-
martin
- Developer

- Posts: 6837
- Joined: 2003-11-21 01:09
- Location: Sweden
-
Contact:
Post
by martin » 2005-05-24 22:05
You should add it to the feature requests section of this forum. I won't implement it unless someone adds it as a request..
-
martin
- Developer

- Posts: 6837
- Joined: 2003-11-21 01:09
- Location: Sweden
-
Contact:
Post
by martin » 2005-07-25 17:19
In hMailServer 4.1, the HTMLBody property is read/write.
-
tazho
- Normal user

- Posts: 53
- Joined: 2005-04-04 18:05
- Location: South Shields
-
Contact:
Post
by tazho » 2005-07-28 09:48
WHAT CAN YOU SAY.