You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

Problem

  • I need to modify the standard e-mail body

Solution

  • Change the stylesheet for e-mail processing

The e-mail stylesheet is contained in the file ./config/scheduler_mail.xsl. You can change the contents in the stylesheet that is included with the <text> elements. You can place your own text here. However, this would apply for the whole JobScheduler installation and in our opinion is not to be recommended.

 

 

It would be better for your purposes if you write your own mail job, which then can be called in specific situations (e.g. when specific errors occur). You can use for this the JobSchedulerManagedMailJob standard job: a description of this job can be found in the installation directories, which are located in the jobs folder. (Note that this only applies if you have installed the JobScheduler with the 'Job Package: Housekeeping Jobs' option.)

Your job could then look like this:

 <job title = "Send Mail" order = "no" stop_on_error = "yes">
      <params>
        <param name="to" value="<mail_adress>" />
        <param name="from" value="<mail_adress>" />
        <param name="subject" value="this is my mail" />
        <param name="host" value="<smtp_server>" />
        <param name="queue_directory" value="c:\temp\smtp" />
        <param name="body" value="this is my body" />
      </params>
    <script language="java" java_class="sos.scheduler.managed.JobSchedulerManagedMailJob">
    </script>
 </job>

You can add your own text for the body. Additional parameters for attachments are available.

 

See also

 

  • No labels