Added 'use email heading'

SVN revision: 631
This commit is contained in:
2003-12-03 11:55:27 +00:00
parent 5cae58f38e
commit 96fa587b6f
2 changed files with 23 additions and 8 deletions
+6 -2
View File
@@ -1086,6 +1086,7 @@ individual logbook sections, one has to log in to each logbook separately.<p>
<LI><b><code>Email &lt;attribute&gt; &lt;value&gt; = &lt;list&gt;</code></b>
<LI><b><code>Use Email Subject = &lt;string&gt;</code></b>
<LI><b><code>Use Email From = &lt;string&gt;</code></b>
<LI><b><code>Use Email Heading = &lt;string&gt;</code></b>
<LI><b><code>Omit Email To = 0|1</code></b>
<LI><b><code>Suppress Email to users = 0|1</code></b>
@@ -1114,7 +1115,9 @@ Email Subject = &lt;string&gt;</b></code> statement specifies which text is
used as the email subject. The text can contain <b><code>$&lt;attribute&gt;
</code></b>statements which are substituted with the current value of that
attribute. For a full list of possible substitutions, see the
"<I>Subst &lt;attribute&gt;</I>" option.<p>
"<I>Subst &lt;attribute&gt;</I>" option. The <b><code>Use Email Heading
= &lt;string&gt;</code></b> specifies the text for the email heading line.
Default is <i>"A new entry has been submitted/updated on [host]"</i>.<p>
The option <b><code>Use Email From = &lt;string&gt;
</code></b> is used for the "<I>From:</I>" field in the email. Please note that more and
@@ -1241,10 +1244,11 @@ flags:<br>
<li>4 : Send URL of logbook entry
<li>8 : Send message body
<li>16: Send optional attachments as email attachments
<li>32: Send logbook name
</ul>
So to send for example only the attributes and the URL, set &lt;n&gt;
to <b>6</b>. Default is <b>31</b> (send everything).
to <b>6</b>. Default is <b>63</b> (send everything).
<p>
<li><b><code>Suppress Email on edit = 0|1</code></b>
+17 -6
View File
@@ -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 ; j<lbs->n_attr ; j++)
{
strcpy(str, " ");