while(fgets(warea,sizeof(warea),fp_top3)!=NULL)
fputs(warea,stdout);
} else {
- snprintf(warea,sizeof(warea),"\"%s\" -s \"SARG %s, %s\" \"%s\" <\"%s\"",MailUtility,_("Report"),asctime(local),email,top3);
+ snprintf(warea,sizeof(warea),"%s -s \"SARG %s, %s\" \"%s\" <\"%s\"",MailUtility,_("Report"),asctime(local),email,top3);
cstatus=system(warea);
if (!WIFEXITED(cstatus) || WEXITSTATUS(cstatus)) {
debuga(_("command return status %d\n"),WEXITSTATUS(cstatus));
#
#use_comma no
-# TAG: mail_utility mail|mailx
-# Mail command to use to send reports via SMTP
+# TAG: mail_utility
+# Mail command to use to send reports via SMTP. Sarg calls it like this:
+# mail_utility -s "SARG report, date" "output_email" <"mail_content"
+#
+# Therefore, it is possible to add more arguments to the command by specifying them
+# here.
+#
+# If you need too, you can use a shell script to process the content of /dev/stdin
+# (/dev/stdin is the mail_content passed by sarg to the script) and call whatever
+# command you like. It is not limited to mailing the report via SMTP.
+#
+# Don't forget to quote the command if necessary (i.e. if the path contains
+# characters that must be quoted).
#
#mail_utility mailx