Email from an xlate code fragment

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Email from an xlate code fragment

  • Creator
    Topic
  • #49382
    Dennis Dunn
    Participant

      Hello,

      I would like to notify staff from within an xlate action whenever a tbllookup fails.  My first attempt at this used the smtp and mime tcl packages to send an email to a specified address.

      When I tested the xlate using the testing tool, everything worked as expected.  The table lookup would fail and the email would be sent.  Sweet!

      When I then moved the xlate into our test environment the thread would crash.  I removed the smtp code from the xlate, cleaned up the pid file etc, and the thread would operate correctly.

      Should this work?  That is, are there some aspects of the engine or the translate thread that would prevent an SMTP connection from within the translate?  Do you have any suggestions on how I might be able to troubleshoot this problem?

      Thanks for your time.  

      –dennis

    Viewing 1 reply thread
    • Author
      Replies
      • #61730
        Chris Williams
        Participant

          In HP-UX we do a similar operation when the tbllookup returns the default value, and we handle it using sendmail while forcing the message to the error db:

          Code:

          set errVariable {}
          if [catch {xpmerror $xlateId alldetail “DrSig ($dictatorSig) not in table”} errVariable] {
             system echo “Subject: $errVariable” | sendmail -fCloverleaf — $emailAddress
          }

        • #61731
          Dennis Dunn
          Participant

            Thanks for the suggestion, I’ll look into the system command.  I’ve got a couple of Windows command line mailers I can try.

            –dennis

        Viewing 1 reply thread
        • The forum ‘Cloverleaf’ is closed to new topics and replies.