help-cgicc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cgicc and sendmail


From: Quintin Connell
Subject: cgicc and sendmail
Date: Tue, 27 Mar 2001 16:17:47 +0200 (SAST)
User-agent: IMP/PHP IMAP webmail program 2.2.3

Hi all,

This isn't a purely cgicc question but rather a more general C++ on how i could 
make greater use of cgicc. 

One of the prime strengths i have found of using PERL or C scripts is their 
ability, in conjuction with sendmail, to send the output from an HTML form to a 
mail receipient, as in this code snippet
        sprintf(t, "/usr/sbin/sendmail %s", cgiGetValue(cgi, "receipient"));
        
        email = popen(t, "w");
        fprintf(email, "Subject: %s\n", cgiGetValue(cgi, "subject"));
        fprintf(email, "From: Quintin Connell <address@hidden>\n");
        fprintf(email, "%s\n", cgiGetValue(cgi, "message"));
        pclose(email);
by piping the output of the form to sendmail using popen().

My question is, how could the equivalent be achieved in C++ with cgicc so that 
i don't have to resort to a hybrid use of C and C++?

Thanks in advance
Quintin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]