home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / shell / 3566 < prev    next >
Encoding:
Internet Message Format  |  1992-08-21  |  1.3 KB

  1. Path: sparky!uunet!olivea!mintaka.lcs.mit.edu!ai-lab!life.ai.mit.edu!friedman
  2. From: friedman@gnu.ai.mit.edu (Noah Friedman)
  3. Newsgroups: comp.unix.shell
  4. Subject: Re: sending mail from shell
  5. Message-ID: <FRIEDMAN.92Aug21234332@nutrimat.gnu.ai.mit.edu>
  6. Date: 22 Aug 92 03:43:32 GMT
  7. References: <1992Aug21.154105.25371@news.duc.auburn.edu>
  8. Sender: news@ai.mit.edu
  9. Organization: Free Software Foundation, 675 Mass Ave. Cambridge, MA 02139
  10. Lines: 21
  11. In-reply-to: hendefd@woof.duc.auburn.edu's message of 21 Aug 92 15:41:05 GMT
  12.  
  13. In article <1992Aug21.154105.25371@news.duc.auburn.edu> hendefd@woof.duc.auburn.edu (Frank Henderson) writes:
  14. >I need a shell script (csh or sh) to send me mail after completion.  I
  15. >tried /usr/lib/sendmail -bm -fperson -t me and then echo'ing a message but
  16. >this requires an EOF or CTRL-d which I don't know how to do from a shell.
  17. >Could someone tell me how to do this or suggest a better way.
  18.  
  19.    If you have sendmail, I find that the following works fine in bourne
  20. shell: 
  21.  
  22.            sendmail -t << __EOF__
  23.            From: me
  24.            To: you
  25.         
  26.            Frob me, baby. 
  27.  
  28.            __EOF__
  29.  
  30.  
  31. If you don't have sendmail but have an SMTP port you can talk directly to,
  32. I have a more complex example that works with bash.  I'll send it to
  33. interested parties by email. 
  34.