sendmail을 commandline에서 실행하시던지, /bin/mail이나 mutt를 script모드로 실행해보세요. man만 때려봐도 할 수 있을정도로 무척 쉽습니다. 구글링하면 예제도 많구요.