Re: execvp and the rest...

From: The Merciless Lord of Everything (
Date: 09/14/00

On Thu, 14 Sep 2000, Shane Lee wrote:

>  From the lib folder, the command would be:
> (Linux server BTW)
> cd ../scripts/
Uhu.. :) I'm sure you don't mean that. I do see the point that you're
trying to call an external source, but why not open a pipe directly to
sendmail instead if the script only sends an email anyway something along
the lines of :

FILE *sendmail;
** Open sendmail Stream
if (!(sendmail = popen("/usr/local/lib/sendmail foo@bar.barfoo","w"))) {
  mudlog("SYSERR: Sendmail cannot be openend, Aborting mail!", BRF,
** Build a nice header
fprintf(sendmail,"From: me <me@my.domain>\n");
fprintf(sendmail,"To: you <you@your.domain>\n");
fprintf(sendmail,"Subject: Whatever subject you'd like\n\n");
fprintf(sendmail,"%s", char_containing_message);
** Close Sendmail stream

This is mailercode, it's early in the morning and so on :) Use if you
like, don't if you don't :)


Sir Alec Guinness
 - May the force be with you, Always!

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  |

This archive was generated by hypermail 2b30 : 04/11/01 PDT