3 Replies Latest reply on Oct 15, 2012 2:20 PM by Dan at Branchbird

    Any documentation on the Mailer component in AppConfig.xml?

      I also see this refered to as the "Mail Notification Bean".
      I would like to find the attribute for the list of emails to receive reports, and I would also like to know how to change things like the replyto address.
      What I have works, but I would like to get what I have cleaned up. So far I have just been doing things by making guesses. Is this documented any where?
        • 1. Re: Any documentation on the Mailer component in AppConfig.xml?
          Dan at Branchbird

          There used to be a great post on EDeN that chronicled this custom mailer component's use. Supposedly all previous EDeN posts have been ported into the Oracle Endeca community here: https://communities.oracle.com/portal/server.pt/community/endeca/515 , but I couldn't find anything.

          That said, I was able to dig some configuration out of one of my old AppConfig.xml files from previous project work:

          <custom-component id="Mailer" class="com.endeca.esource.dtmailerutility.MailNotificationComponent" host-id="ITLHost">
          <property value="${mailer.smtpHost}" name="smtpHost"/>
          <property value="${mailer.srcAddr}" name="srcAddr"/>
          <property value="${mailer.destAddr}" name="destAddr"/>
          <directory name="savedMsgDir">./logs/saved_msgs</directory>

          where the ${mailer.*} tokens are set in the accompanying environment.properties file:

          # Environment specific properties
          mailer.smtpHost = smtp.branchbird.com
          mailer.srcAddr = admin@branchbird.com
          mailer.destAddr = admin@branchbird.com

          Then in your baseline java beanshell script you could call out something like to pass in the subject and body of the email message:

          Mailer.sendExceptionMsg("Error running Baseline Update", e);

          As you've probably already done, you need to make sure the Mailer .jar is on your classpath via the ./control/runcommand.bat file:

          set CLASSPATH=%CLASSPATH%;%~dp0\..\config\lib\java\mail-notification.jar

          And as you see above you also need to make sure your .jar is in the ./config/lib/java directory.

          I hope this helps.

          • 2. Re: Any documentation on the Mailer component in AppConfig.xml?
            So have I have all of that and it works. Now I would like to expand on that functionlity.

            1] Emailing reports
            I am able to email the daily and weekly reports using this "Mailer.setReportDestAddrList("email-addr1,email-add2)". So I figured there must be a property value named "reportDestAddrList" which I could set. But that didn't work. Why are the properties for Mailer not documented some where? Like I said I have this functionality working, so this is not killing me.

            2] Setting the reply-to some thing different
            When the email is sent the reply-to is set to the server on which Endeca is running. So it is a reply-to value for which you can not send an email back to. I would like the reply-to value to be the email address for the support group, whick I am in. So if some one has a question about the report there isn't any confustion about who to email.


            Edited by: EndecaJoe on Oct 15, 2012 7:01 AM
            • 3. Re: Any documentation on the Mailer component in AppConfig.xml?
              Dan at Branchbird
              Joe, the Mailer component was never Endeca product. It was servicesware that found use on many Endeca implementations. That is why there is no formal documentation on it, unfortunately. I found that the .jar component was packaged with source code, so I cracked it open and got a better idea of what can and can't be set.

              1) From the source, you can do one of these two things to specify more than one destination address:

              * - destAddr or destAddrList (required): at least one destination address is required. If
              * more than one destination address is necessary, configure the separate addresses as
              * destAddr1, destAddr2, destAddr3, and so on. Or use the destAddrList property to configure
              * a comma-delimited list of destination addresses.

              2) This should be the srcAddr property. Are you setting this property?

              Hope this helps.