Need help in writing a unix script

OS: Solaris
Shell : KSH

Please help me in writing a script that captures a error message from a log file ( which updates continiously ) and send an email alert as soon as the systems throws a error message into that log.

i.e With out monitoring the log

Thanks in advance..

Your going to have to make the first effort. What OS and what shell are you using? Post what you have.