Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
outlinh1. true
outlinh1. true
1printablefalse
2stylh1. none
3indent20px

Problem

  • the file type of the JobScheduler log attached to the mails is .log
  • this files should not attached to the mail
  • the mail should contain other attachments with different file types

Solution

  • See "How to configure an e-mail service" to  to change the JobScheduler configuration if necessary.
  • Change the sytlesheet stylesheet for JobScheduler e-mail service to suppress attachments of the file type .log

from

Code Block
languagexml

<?xml version='1.0' encoding='iso-8859-1' ?>
<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version   = "1.0">
    
   ...

   <xsl:template match="/scheduler_event">
      ...
      <xsl:copy-of select="mail/body/* [ not( text ) ]" />
      ...
   </xsl:template>

</xsl:stylesheet>

to

Code Block
languagexml

<?xml version='1.0' encoding='iso-8859-1' ?>
<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version   = "1.0">
    
   ...

   <xsl:template match="/scheduler_event">
      ...
      <xsl:copy-of select="mail/body/* [ not(text) and not (//file) ]" />
      
      <xsl:for-each select="mail/body/file" >
         <xsl:if test="not(contains(@path, '.log'))">
           <xsl:element name="{name()}">
              <xsl:copy-of select="@*" />
              <xsl:attribute name="mail_filename">
                 <xsl:value-of select="$filename" />
              </xsl:attribute>
           </xsl:element>
         </xsl:if>
      </xsl:for-each>
      ...
   </xsl:template>

</xsl:stylesheet>

The attribute @mail_filename is for used to determine the name of the attached file. If this attribute is missing, @path will be used. In this example files with the extension .log are suppressed.excluded from mail delivery.