can this program work?
________________________________
char buffer[1024];
FILE *pFile;
pFile = popen("/var/qmail/bin/forward [EMAIL PROTECTED]","w");
if (!pFile) err_sys("error open pipe file");
while(fgets(stdin,buffer,sizeof(buffer)-1))
fputs(buffer,pFile);
if (pclose(pFile)) err_sys("error close pipe");
exit(0);
_______________________________
----- Original Message -----
From: "Silver Dirk" <[EMAIL PROTECTED]>
To: "shenjuefei" <[EMAIL PROTECTED]>
Sent: Thursday, March 22, 2001 4:44 PM
Subject: Re: About dot qmail program!
> ���£�
>
>
> ****************************************************************************
>
> #define BUFFSIZE 4096
>
> char buf[BUFFSIZE];
> if ((pFile = popen("/var/qmail/bin/forward [EMAIL PROTECTED]", "w")) ==
> NULL)
> fprintf(stdout, "error open pipe file\n");
>
> bytes = read(0, buf, BUFFSIZE);
> while (bytes > 0)
> {
> if (write(pFile, buf, bytes) != bytes)
> sys_err(ERROR_WRITE);
> bytes = read(0, buf, sizeof(buf));
> }
>
> if (pclose(pFile) == -1)
> fprintf(stdout, "error close pipe file\n");
>
> ****************************************************************************
>
>
> ----- Original Message -----
> From: "shenjuefei" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, March 22, 2001 4:35 PM
> Subject: Fw: About dot qmail program!
>
>
> > can u send me your program? I think u have mistake in useing stream IO or read
>function .
> > >
> > > ----- Original Message -----
> > > From: "Silver Dirk" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Thursday, March 22, 2001 12:04 PM
> > > Subject: About dot qmail program!
> > >
> > >
> > > > Hello all,
> > > >
> > > > I write a program use C/C++ language, and put its path into a dot qmail
>file like this:
> > > >
> > > > |/path/to/my/program/getmailcontent
> > > >
> > > > But I get nothing but headers. So I need urs help how to get the whole
>mail content from
> > > > this environment.
> > > >
> > > > Thanks a lot.
> > > >
> > > > Dirk.ye
> > > > 2001/3/23
> > > >
> > > >
> > >
> >
>