Hi,
On Thu, Jan 22, 2004 at 10:58:28AM +0100, Thomas Bretz wrote:
> is it possible to send eMails from the root environment? It would be a
> very nice feature if root is able to access an SMTP host, eg for sending
> reports about automatic procedures...
There are at least millions of implentations of exactly this available,
on windows, unix, ... Just call it externally, like this (not tested
for errors):
FILE *f=popen("external_program with arguments","w");
if(!f){
complain();
return;
}
fprintf(f,"I can send email.\n");
if(-1 == pclose(f)){
complain();
}
On a well administered system "/bin/mail -s subject user@host"
will do just fine.
Chris
--
Out of memory.
We wish to hold the whole sky,
But we never will.
-- Francis Heaney
This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:05 MET