From: "Olaf van der Spek" Newsgroups: comp.os.msdos.djgpp References: Subject: Re: Pipe to sendmail (like Perl) Lines: 38 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Message-ID: Date: Sun, 02 Jul 2000 19:44:27 GMT NNTP-Posting-Host: 213.46.21.6 X-Complaints-To: abuse AT chello DOT nl X-Trace: flipper 962567067 213.46.21.6 (Sun, 02 Jul 2000 21:44:27 MET DST) NNTP-Posting-Date: Sun, 02 Jul 2000 21:44:27 MET DST Organization: Chello Broadband To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "Damian Yerrick" schreef in bericht news:dc1vlskc3oc35ir4sld7ck0755jqftevkb AT 4ax 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. > I tried it on a Unix server. > -- > 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/