I double checked and no, I'm definately not using nail. (I might look into it though) And the man pages for mail clearly show that ~/.mailrc is the user's config file for the app. Everything I read makes me think that the mail program, by itself, is not capable of sending mail over the internet using SMTP. (I'm probably wrong.) It seems to need a mail server running like sendmail so I'm guessing I just don't have sendmail setup correctly. But I don't even see anything in the sendmail man pages about defining an external SMTP server.
Anyway, I know that in *IX, there are almost always many ways to skin any particular cat. So I did some googling and found:
1) SMTP is REALLY SIMPLE! You can send email from a terminal with just a few simple commands. That's why it's called "SIMPLE Mail Transfer Protocol" 8^)
2) To do it from a program is harder since the protocol requires waiting for the replies from the SMTP server for sending the next command, etc. A "here" document in a shell script doesn't work because it doesn't wait for replies.
3) There is a really slick little Perl script that simply does just what I want. It's called "sendEmail" (http://caspian.dotconf.net/menu/Software/SendEmail/
) and it works great. Don't even need to compile, etc since it's just a stand-alone script (as long as you have the Perl interpreter on your machine). It just does the proper connecting, talking, waiting, talking, etc in the SMPT language to fire off your mail without the overhead of a mail server, etc, etc. Cool!
I'd still love to know how to do this with "mail", "sendmail", etc. but for now, I'm back in business.
Thanks for your pointers, etc.