[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROGRAMMERING] mail fra C++



Hej Bo

Bo Mangor wrote:
Hej alle
Jeg har en lille C++ program der køre nogle check på et system, bl.a.
diskplads og det køre skam fint som det er, men jeg vil gerne have det til
at sende en mail, hvis der er fejl.

Du burde kunne gøre noget i stil med


  system("echo -e 'Subject: Disk is full\n"
    "To: sslug@sslug"
    "From: sslug@sslug"
    "Din disk er Fuld så der er nok ikke plads til at sende den mail ;-)'"
    "| /usr/bin/sendmail sslug@sslug");

Hvordan checker du diskplads ? Man kan nok gøre det med en system(), men
er der ikke en smartere måde ? Og er der noget kode, der virker på
både Linux og Windows ?

--PMM



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 22:43 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *