delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/07/02/14:31:36

From: "Tim \"Zastai\" Van Holder" <zastai AT hotmail DOT com>
Newsgroups: comp.os.msdos.djgpp
References: <l%K75.252146$k22 DOT 1109779 AT flipper> <dc1vlskc3oc35ir4sld7ck0755jqftevkb AT 4ax DOT com>
Subject: Re: Pipe to sendmail (like Perl)
Lines: 34
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Message-ID: <nFL75.80815$NF5.1354609@afrodite.telenet-ops.be>
Date: Sun, 02 Jul 2000 18:15:47 GMT
NNTP-Posting-Host: 213.224.63.5
X-Trace: afrodite.telenet-ops.be 962561747 213.224.63.5 (Sun, 02 Jul 2000 20:15:47 MET DST)
NNTP-Posting-Date: Sun, 02 Jul 2000 20:15:47 MET DST
Organization: Pandora - Met vlotte tred op Internet
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Damian Yerrick <Bullcr_pd_yerrick AT hotmail DOT comRemoveBullcr_p> wrote in
message news:dc1vlskc3oc35ir4sld7ck0755jqftevkb AT 4ax DOT com...
> On Sun, 02 Jul 2000 17:30:57 GMT, "Olaf van der Spek"
> <Olaf AT XCC DOT TMFWeb DOT NL> 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.
Actually, DJGPP's support for popen/pclose makes this very possible on DOS
(see my other post).

--
Hi, I'm a signature virus. plz set me as your signature and help me spread
:)




- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019