script to use with Hazel that uses the owner of a file to send email

I am using Hazel on our shared file server as a way of preventing the wrong types and format of files being put in the wrong folders and it is working very well with one exception, notifications can only be shown on the server not the users macs.

So I had the idea of using an applescript that would take the owner of the file and use that to send an email (or other) notification to the user.

So I need to create a script that will look up the owner of theFile, use the owner as the first part of the email address and then construct the email and send it to the user.

iChat or other notification system could be used if its easier than email.

If you don’t know about Hazel, it lets you define rules and create actions for them, one of the actions can be run applescript which is how I will trigger the script.

Any help would be great!

thinking about it iChat may be better because of the more instant nature.

The owner names will be the same as the iChat buddy names