From: Damian Yerrick Newsgroups: comp.os.msdos.djgpp Subject: Re: Pipe to sendmail (like Perl) Organization: Pin Eight Software http://pineight.8m.com/ Message-ID: References: X-Newsreader: Forte Agent 1.7/32.534 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 29 X-Trace: /KDWjZxZnj7oMe40q8JEj0Eh8QVWlrYQdCnAm0lM1rkFr5hPqx67xnnYYs0MvOHrzwcgup+Ehcrh!pxr0recg780+6xUOuUr+djJpohbkpCP9cBIo3lTe7ntxLvxVmWG5zRM6Tc9iUwWacZVc+Pa8Gi0N!TSNZ X-Complaints-To: abuse AT gte DOT net X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we will be unable to process your complaint properly NNTP-Posting-Date: Sun, 02 Jul 2000 18:12:02 GMT Distribution: world Date: Sun, 02 Jul 2000 18:12:02 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Sun, 02 Jul 2000 17:30:57 GMT, "Olaf van der Spek" wrote: >So in C++, I tried: >void send_mail(const string& from, const string& to, const string& subject, >const string& body) >{ > ofstream mail; > mail.open("|/usr/sbin/sendmail -oi -t"); > if (!mail.is_open()) > cout << "Can't open pipe to sendmail" << endl; > mail << "To: " << to << endl > << "From: " << from << endl > << "Subject: " << subject << endl > << body; >} > >But that didn't work, I got the error "Can't open pipe to sendmail". >Anybody knows how this could be solved? By not using DOS. DOS doesn't really support pipes like Eunuchs does. -- Damian Yerrick "I refuse to listen to those who refuse to listen to reason." See the whole sig: http://www.rose-hulman.edu/~yerricde/sig.html This is McAfee VirusScan. Add these two lines to your signature to prevent the spread of signature viruses. http://www.mcafee.com/