Skip to end of metadata
Go to start of metadata

Problem

  • the mail configuration in ./config/factory.ini is not sufficient to set a from-name.
  • the JobScheduler generates automatically Scheduler <host>:<port> -ih1. <id> ....

Solution

  • see "How to configure an e-mail service" to change the JobScheduler configuration if required.
  • Change the stylesheet for JobScheduler e-mail service to a from-name (i.e. JobScheduler):
 <?xml version='1.0' encoding='iso-8859-1' ?>
 <xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version = "1.0">
     
    <xsl:param name="lang" select="'en'"/> 
     
    <xsl:variable name="job"  select="/scheduler_event/state/jobs/job[ @job = /scheduler_event/@job ]" />
    <xsl:variable name="task" select="$job/tasks/task[ @task = /scheduler_event/@task ]" /> 
 
    <xsl:template match="/scheduler_event">
       ...
       <xsl:element name="header">
          <xsl:copy-of select="mail/header/@from_address" />
          <xsl:attribute name="from_name"><xsl:value-of select="'JobScheduler'"/></xsl:attribute>
          <xsl:copy-of select="mail/header/@to" />
          <xsl:copy-of select="mail/header/@cc" />
          <xsl:copy-of select="mail/header/@bcc" />
          ...
       </xsl:element>
       ...
    </xsl:template>
    ...
 </xsl:stylesheet>

Please note that if the attribute from_name is empty then the JobScheduler generates its own from_name in the form Scheduler <host>:<port> -id=<id> ....

Write a comment…