有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

用于发送电子邮件的java Ant脚本

我们正在使用下面的ant脚本发送测试报告的电子邮件。到目前为止,我们正在将文本数据包含在电子邮件中,加载时间太长。所以我们只想在电子邮件中包含HTML链接。请帮我修改代码

<target name="mailreport">
        <property name="mail.recipient" value="praskulk_org_ww@oracle.com"/>    
        <property name="mail-host" value="internal-mail-router.oracle.com"/>
        <!--<property name="mail-host" value="stbeehive.oracle.com"/>-->
        <property name="mail-port" value="25"/> 
        <property name="mail-from" value="prashant.f.sharma@oracle.com"/>   
        <property name="branchName" value="${env.PBCS_VERSION}"/>
        <property name="buildNum" value="${env.PBCS_BUILD}"/>
        <property name="mail-subject" value="JUnit Test Results. Branch: ${branchName} Build: ${buildNum}"/>    
        <echo>Mail being sent to: ${mail.recipient}</echo>
        <zip destfile="report/report.zip"
            basedir="report/html/"/>
        <mail mailhost="${mail-host}" mailport="${mail-port}"
                from="${mail-from}" tolist="${mail.recipient}"              
            subject="${mail-subject}"
            messagemimetype="text/html"
            messagefile=
                    "report/html/junit-noframes.html">
          <attachments>
            <fileset dir="report/">
              <include name="**/*.zip"/>
            </fileset>
          </attachments>                                    
        </mail> 
</target>

共 (0) 个答案