Why script didn't work?

Use this forum if you have problems with a hMailServer script, such as hMailServer WebAdmin or code in an event handler.
Post Reply
mns17
Normal user
Normal user
Posts: 124
Joined: 2008-06-18 11:13

Why script didn't work?

Post by mns17 » 2010-06-07 09:14

subject include russian simbol!!!
script:

Sub OnSubjectov(oMessage)
EventLog.write("Subject befor - " & oMessage.Subject)
oMessage.Subject = "[ov] " & oMessage.Subject
EventLog.write("Subject after - " & oMessage.Subject)
oMessage.Save
End Sub

Result:

4900 "2010-06-07 14:02:46.487" "Subject befor - Калмыкову Ивану - пример "технического решения" [Fwd: ТР версии 1.2]"
4900 "2010-06-07 14:02:46.488" "Subject after - [ov] "
---------------------------------------------------------------------------------------------
4900 "2010-06-07 14:08:08.924" "Subject befor - абвгде"
4900 "2010-06-07 14:08:08.924" "Subject after - [ov] "
---------------------------------------------------------------------------------------------

4900 "2010-06-07 14:14:09.673" "Subject befor - test"
4900 "2010-06-07 14:14:09.674" "Subject after - [ov] test"

^DooM^
Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

Re: Why script didn't work?

Post by ^DooM^ » 2010-06-07 09:24

What version of hMail are you using?
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

mns17
Normal user
Normal user
Posts: 124
Joined: 2008-06-18 11:13

Re: Why script didn't work?

Post by mns17 » 2010-06-07 09:51

5.3.2-B1769

User avatar
martin
Developer
Developer
Posts: 6834
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Re: Why script didn't work?

Post by martin » 2010-06-07 18:14

If you disable the script, send another message with the same content, locate the .EML file, zip the EML file and send it to me at martin@hmailserver.com I can see if I can reproduce it.

mns17
Normal user
Normal user
Posts: 124
Joined: 2008-06-18 11:13

Re: Why script didn't work?

Post by mns17 » 2010-06-08 04:14

Martin, i send e-mail to you with zip

User avatar
martin
Developer
Developer
Posts: 6834
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Re: Why script didn't work?

Post by martin » 2010-06-08 22:27

I've found the problem. It occurs if you try to modify the subject of a message with no message-wide character set. The issue will be fixed in 5.4 (a beta will be available within a week).

I don't know russian. Is the Subject of the message you sent me confidential, or can I add this subject to the automated test suit for hMailServer (which is public)? (I've removed the From-address, To-address and every other field except for the subject line).

mns17
Normal user
Normal user
Posts: 124
Joined: 2008-06-18 11:13

Re: Why script didn't work?

Post by mns17 » 2010-06-09 04:20

Thank, martin.

New Subject on russian for your automatic test:
"Это тестовая тема письма для проверки работы севрера с русскими символами"

User avatar
martin
Developer
Developer
Posts: 6834
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Re: Why script didn't work?

Post by martin » 2010-06-18 18:08

Thanks.

Let me know if you want to test 5.4. It's not really ready to be used in production but if you have something specific which you want to test in a test tenvironment, just let me know.

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: Why script didn't work?

Post by Bill48105 » 2010-06-18 19:05

Did I hear 5.4?!? Got my testbed all ready! :D
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

Post Reply