diff --git a/doc/config.html b/doc/config.html index 9307e6db..5dff372f 100755 --- a/doc/config.html +++ b/doc/config.html @@ -1086,6 +1086,7 @@ individual logbook sections, one has to log in to each logbook separately.

  • Email <attribute> <value> = <list>
  • Use Email Subject = <string>
  • Use Email From = <string> +
  • Use Email Heading = <string>
  • Omit Email To = 0|1
  • Suppress Email to users = 0|1 @@ -1114,7 +1115,9 @@ Email Subject = <string> statement specifies which text is used as the email subject. The text can contain $<attribute> statements which are substituted with the current value of that attribute. For a full list of possible substitutions, see the -"Subst <attribute>" option.

    +"Subst <attribute>" option. The Use Email Heading += <string> specifies the text for the email heading line. +Default is "A new entry has been submitted/updated on [host]".

    The option Use Email From = <string> is used for the "From:" field in the email. Please note that more and @@ -1241,10 +1244,11 @@ flags:

  • 4 : Send URL of logbook entry
  • 8 : Send message body
  • 16: Send optional attachments as email attachments +
  • 32: Send logbook name So to send for example only the attributes and the URL, set <n> -to 6. Default is 31 (send everything). +to 6. Default is 63 (send everything).

  • Suppress Email on edit = 0|1 diff --git a/src/elogd.c b/src/elogd.c index 7df6ff7b..58e30030 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -6,6 +6,9 @@ Contents: Web server program for Electronic Logbook ELOG $Log$ + Revision 1.160 2003/12/03 11:55:27 midas + Added 'use email heading' + Revision 1.159 2003/11/27 10:15:39 midas Fixed bug with deny/allow commands in other languages @@ -10136,7 +10139,7 @@ char list[MAX_PARAM][NAME_LENGTH], url[256], comment[256]; return 0; } - flags = 31; + flags = 63; if (getcfg(lbs->name, "Email format", str)) flags = atoi(str); @@ -10155,18 +10158,26 @@ char list[MAX_PARAM][NAME_LENGTH], url[256], comment[256]; if (flags & 1) { - if (old_mail) - sprintf(mail_text+strlen(mail_text), loc("A old entry has been updated on %s"), host_name); + if (getcfg(lbs->name, "Use Email heading", str)) + { + sprintf(mail_text+strlen(mail_text), str); + } else - sprintf(mail_text+strlen(mail_text), loc("A new entry has been submitted on %s"), host_name); + { + if (old_mail) + sprintf(mail_text+strlen(mail_text), loc("A old entry has been updated on %s"), host_name); + else + sprintf(mail_text+strlen(mail_text), loc("A new entry has been submitted on %s"), host_name); + } sprintf(mail_text+strlen(mail_text), "\r\n\r\n"); } - if (flags & 2) - { + if (flags & 32) sprintf(mail_text+strlen(mail_text), "%s : %s\r\n", loc("Logbook"), lbs->name); + if (flags & 2) + { for (j=0 ; jn_attr ; j++) { strcpy(str, " ");