Bug fix---check return code from fread()
Use <path.h> to get sendmail path.