mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

al_xipe
16.25.2007 8bd1e834177d0fff0f50ab2a8ef846a0dc10cb55
1. work around a limitation in the implementation of ant's mail task. The mere fact of specifying the user and password parameters will have the task try to use SMTP authentication even though the parameter value is empty. So I had to split the target in three. One global target that check the user variable length, one that sends the email with SMTP auth and one that sends the email without SMTP auth.
1 files modified
24 ■■■■ changed files
opendj-sdk/opends/tests/functional-tests/staf-installer.xml 24 ●●●● patch | view | raw | blame | history
opendj-sdk/opends/tests/functional-tests/staf-installer.xml
@@ -620,10 +620,27 @@
      <equals arg1="${email.enabled}" arg2="y" 
              casesensitive="false" trim="true"/>
    </condition>
    <antcall target="send-report-email"/>
    <antcall target="send-mail"/>
  </target>
  <target name="send-report-email" if="email.send">
  <target name="send-email" if="email.send">
    <condition property="email.send.auth">
      <length string="${email.server.user}" when="greater" length="0"/>
    </condition>
    <antcall target="send-mail-noauth"/>
    <antcall target="send-mail-withauth"/>
  </target>
  <target name="send-mail-noauth" if="email.send.noauth">
    <mail from="${email.from}"
          tolist="${email.to}"
          subject="FT - ${daily.date} - ${os.name} - ${os.arch}"
          files="${staf.tmp.dir}/results.html"
          mailhost="${email.server.host}"
          mailport="${email.server.port}"
          messagefile="${staf.tmp.dir}/results.html"
          messagemimetype="text/html" />
  </target>
  <target name="send-mail-withauth" unless="email.send.noauth">
    <mail from="${email.from}" 
          tolist="${email.to}" 
          subject="FT - ${daily.date} - ${os.name} - ${os.arch}"
@@ -633,8 +650,7 @@
          user="${email.server.user}"
          password="${email.server.pwd}"
          messagefile="${staf.tmp.dir}/results.html"
          messagemimetype="text/html">
    </mail>
          messagemimetype="text/html" />
  </target>
  
  <target name="daily">