Created a folder named "NotifyScript" in the perforce server directory. Place this script into this folder.
Then run command "p4 triggers" in the command line(you need to be a perforce SUPERUSER).
Add the following line:
On Windows:
mail commit //depot/... "cscript E:\perforce\Scripts\notify\mail.js /changelistnumber:%changelist% /user:%user%"

On Linux (Suse10.2):

1. Copy the file js -> /bin/js
2. make executable chmod
3. Copy libjs.so.0.2.5 -> /usr/lib/libjs.so.0.2.5
4. run ldconfig
5. p4 triggers
6. Add to the end of the file:
mail change-commit //... "js -f /perforce/database/mail.js %changelist% %user%"


//... 		<-- All depots
//depot/... 	<-- Only Depot "depot"
-f $PATH_to_Mail_SCRIPT

DON'T FORGETT TRAILING TAB

Special for Windows:
You need also add the user "system" to a group because perforce will execute the script as "system" user and without
the user in a group he'll not be able to get output from p4 commands.