Ever wonder how plug-ins are made for Mail.app?
Well Apple does provide an API for doing them. According to this web site, the API isn’t documented by Apple, but this site does document it.
The author is listed as James R. Egan. It was written in 2006, but most of what is here should still apply and he has updated versions of his plug-in. His plug-in scans your e-mail for references to attachments. If such a reference is there, it will look to make sure that there is an attachment. If not, it will warn you that there is no attachment.
See the tutorial on programming plug ins here: http://home.cc.gatech.edu/eaganj/MailApp
To down load the plug-in go here: http://www.bazza.com/~eaganj/weblog/code/mail-plugin/