Date: Mon, 3 Jul 2000 13:15:25 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Olaf van der Spek cc: djgpp AT delorie DOT com Subject: Re: Pipe to sendmail (like Perl) In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Mon, 3 Jul 2000, Olaf van der Spek wrote: > I tried this: > > #include > > int main() > { > FILE* mail = popen("/usr/sbin/sendmail", "wt"); > cout << mail << endl; > return 0; > } > > But the output is: > (nil) I'm not a C++ expert, but IIRC you cannot use cout in conjunction with a FILE object. Checking whether mail is a NULL pointer might shed some light on what's going on. In any case, what do you expect sendmail to produce when you pass it an empty line?