gumby@ucrmath.ucr.edu (john donahue) (01/05/91)
Here's some background into my problem... I'm working on a front-end to the mail program on my machine (running SCO Xenix v2.3.2GT and using smail 2.5c and deliver for mail [though SCO's mail program is still intact]) and I want it to be very easy to use for people not familiar with Unix. When a letter is created and it needs to be delivered, I open up a pipe to smail and send it all the information: a basic mail header with the "To:", "From:", "Date:" lines followed by the textual portion of the user's letter. This works fine. If, however, the user wishes to send copies to several individuals, I've found that sending a "Cc:" line through this pipe to smail does not work. It is simply ignored! The current kludge is to, within a loop, send a copy of each letter to smail by reopening a pipe and recreating the "To:" line for each recipient. Needless to say, this is slow and inefficient. While using the standard SCO mail program, it is possible to use a "tilde-escape" sequence "~c <user>" to add a user to the "Cc:" line. I attempted this (by piping the letter though this mail program) and it was ignored as well. I guess mail interprets this command and performs the necessary work immediately, instead of looking at what you type as a whole and parsing this information out (makes sense) when you finally enter ^D. So, basically, I am looking for an answer to this problem? How do I send a letter to multiple recipients, using a pipe to smail, such that only *one* copy of the letter body is piped, and a "Cc:" line is somehow generated/interpreted? Any help is appreciated. I posted a similar article to comp.unix.programmer and got no replies, but several "If you find out, tell me" letters from other interested programmers. Cheers! -- John Donahue gumby@ucrmath.ucr.edu