check mail for certain word before sending

Are you committed to using just Mail.app?

If you go to http://macupdate.com and search for Mail Merge there are a page of hits. At first blush, this one seemed to be right up your alley, but I may not understand fully what you are looking for.

https://www.macupdate.com/app/mac/11731/mailmergeapp Claims to use your address book, and a composed message, and it does the substituting.

If your outgoing messages are batched, take a look at external software for sending out email. In my other life I use Mail Chimp to send out news letters, but there are many many others, with various features.

A final possibility is to abandon Mail.app alltogether, and throw together a perl script that does the substitutions, and makes a call to /bin/mail for sending.