dvk (07/30/82)
I think this is the correct newsgroup... Anyway, we use Rand's MH editor, and I know we are not the only ones. I find it very frustrating to use the reply option, only to be dumped into the old (translate - garbage) Unix mail, which accepts text, and then sends it: no editin', no nuthin'. I checked the code, and the MAILER environment variable allows you to be marginally clever (like if you define it to be "mail -subj %s" instead of the default "mail", it puts the subject in place of your "%s". Semi- cute, at best), but this just isn't enough. So I hacked (literally; I make no claims as to speed or elegance) the code so that if MAILER == "mh", it sets up a formfile in $HOME/Mail/net.$$, calls "comp -form $HOME/Mail/net.$$", and then deletes the formfile. The formfile contains the filled in fields for To: <name>, and Subject: <subj>, so you are never prompted for them, but instead they get done automatically. You are now in MH, and you get all the neat features that it supplies. (You might want to add a "Cc:" field to the formfile, but you can aways edit your text, too...). Anyway, a diff listing follows for those who would desire this interface. I know its ugly, so if you have complaints, don't say I didn't warn you. Daniel Klein, Mellon Institute, Pittsburgh 492,495c492,493 < if (strcmp(MAILER,"mh")) { < fprintf(ofp, "To: %s\n", rcbuf); < fflush(ofp); < } --- > fprintf(ofp, "To: %s\n", rcbuf); > fflush(ofp); 502,512c500,501 < if (strcmp(MAILER,"mh")) { < sprintf(rcbuf, MAILER, hptr->title); < sprintf(bfr, "%s %s", rcbuf, address); < } else { < sprintf(bfr,"cat >%s%s\nTo: %s\nSubject: %s\n%s\nETX\n%s%s%s", < userhome,"/Mail/net.$$ << ETX", < address,hptr->title, < "----------", < "comp -form net.$$;rm ", < userhome,"/Mail/net.$$"); < } --- > sprintf(rcbuf, MAILER, hptr->title); > sprintf(bfr, "%s %s", rcbuf, address);
jerry (07/30/82)
General mechanisms for invoking mailers should be the goal not modifications to news that are specific to a particular editor/mailer. You ought to have a shell script to do what ever you want and then make MAILER "mymailer '%s' ..." where the three dots indicate the other information you might get from readnews. (I'm not sure what is available). Jerry Schwarz -- eagle!jerry -- BTL Murray Hill -- (201) 582-5926
mark (07/31/82)
This is why I think forced interactive mail senders are silly. Your program has to stuff them with input interactively or else fill out their form. If I were fixing the news/MH bridge, I would add two flags to comp that probably should have been there from the beginning: -subj %s (specifies the subject) -to %s (specifies the destination) Then you wouldn't need any mods to news, and certainly news wouldn't have to know about MH specifically as a mailer. Probably an unrecognized argument to comp should be treated as "-to", unless there is some conflicting usage somewhere. Then, you could set MAILER to comp -subj %s -to Mark