| delorie.com/archives/browse.cgi | search |
| From: | "Olaf van der Spek" <Olaf AT XCC DOT TMFWeb DOT NL> |
| 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: | 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: | <vYM75.252787$k22.1116117@flipper> |
| 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" <Bullcr_pd_yerrick AT hotmail DOT comRemoveBullcr_p> schreef in
bericht 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.
>
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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |