Versions Compared

Key

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

...

Then use the info here to create a new MC:SystemAlerter task. For the new task use the tag from the action config and make it a one-off task. The xml file that needs to be uploaded contains the settings for the emails (see mcSystemAlerter.xsd schema). In here it is possible to use the tag %LOG% in the body of the email. This tag will then be replaced by the logmessage(s) that triggered sending the email. An example:

Code Block
xml
xml

<mcSystemAlerter>
   <alerts>  
      <emailalert>
         <recipients>
            <recipient email="Some.body@somewhere.org"></recipient>
         </recipients>
         <configuration>
            <smtp fromaddress="Some.body@somewhere.org" host="smtp.deltares.nl"></smtp>
         </configuration>
         <subject>
            <subjectline content="The subject line of the email to send"></subjectline>
            <substitutions></substitutions>
         </subject>
         <body value="%LOG%"></body>
         <attachments></attachments>
      </emailalert>
   </alerts>
</mcSystemAlerter>

When scheduling the task, set the start time somewhere in the future, otherwise the task runs immediately. Then search the new task in "scheduled tasks" and set it to suspend. When the action config is triggered, then it copies the suspended task and runs the copy once.

 


Warning
NB. Note that the fromaddress field will fallback to InternetAddress.getLocalAddress() which is according to specification but in rare cases will fail to 
provide a suitable fromaddress and will cause errors in the 
synchronisation_log.txt (where the MCSystemAlerter logs its errors). Including the fromaddress will resolve this matter.