I just did some research on the web, turns out fileName is a misleading name for the variable.
It's actually a File Object, obtained by enumerating a Folder Object from the FileSystem ActiveX.
Anyway, you can get its filename by using
js code:
Messenger.MyPersonalMessage=fileName.Name
I'm not sure wether that includes the extension or not (still on linux), but I think it does. You can remove the extension with the substring method, as fileName.Name should be a string.