$ find dir1 dir2 dir2 -name '*.out' \ '!' -exec grep -q error {} ';' \ -exec sh -c 'echo "Whatever" | mail you@there.foo' ';'