There are two different things here - how to send mail to yourself, and then how to read it ... :-)
Sending is straightforward - use the 'mail <address>' command. If you run it interactively, it will (probably, if you have a helpful distro) prompt you for the subject, then the message. Finish with either ".<ret>" on a new line, or "^D" on a new line. If you want to use it in a program, that's fine too ... just pipe the text into the mail command (i.e. "command with interesting output | mail user") Check the man page for other invocation options. Then, assuming that there is a local mail server running (again, helpful distros will have done this for you), your email will be delivered to your user's default spool file ... that's usually an mbox file (i.e. all the mail items run on one after the other) found in /var/spool/mail/user, or wherever your $MAIL envariable points. You can read that with the mail command, although the interface is a little gnarly - just run 'mail' with no parameters. Or check to see if you have a better program, such as mutt. -jim On Mon, 2004-01-26 at 08:35, Helmut Walle wrote: > Send it to [EMAIL PROTECTED] > Provided you have sendmail (or equivalent) running, it will get > delivered automatically. If you don't, you will have to run > sendmail -q > explicitly. You can check your local queue with mailq. > > Hope this helps, > > Helmut. > > -----Original Message----- > From: anton <[EMAIL PROTECTED]> > Sent: Sun, 25 Jan 2004 22:45:44 +1300 > To: CLUG <[EMAIL PROTECTED]> > Subject: local mail > > > hi all, > Probably far too late... I can't for the life of me work out how to do > (access) local mail! I.e, how do I send myself a message at > [EMAIL PROTECTED] (billy.local being the name of my machine)? I > ...
