smtp is the simple mail transfer protocol and is provided by all mta's (notably sendmail and qmail on *nix)
from the command line do:
mail -s "this is the subject" receiver@example.com < /path/to/textfile
this will send textfile to receiver@example.com with the subject "this is the subject"
to see what happens when you run this command, look at your mail log. it is almost always in /var/log/maillog. view it with tail, ie:
tail /var/log/maillog