2013-05-02 71 views
0

这是关于关于ANT中的“发送电子邮件”任务。我想在发送邮件目标中添加一个“cc”。将“cc”添加到ANT中的邮件任务

当我添加“cc”电子邮件时,它给了我一个例外“邮件不支持嵌套的”cclist“元素”。你能否让我知道问题是什么。

以下是发送电子邮件的ANT目标。

<target description="Generates and send junit test reports" name="send-report"> 
    <mail mailhost="smtp.gmail.com" mailport="25" password="testing" ssl="true" subject="Junit Test Reports for Timescity" user="[email protected]"> 
    <from address="[email protected]"></from> 
    <replyto address="[email protected]"></replyto> 
    <to address="[email protected]"></to> 
    <cclist address="[email protected]"></cclist> 
    <message>testing for sending email</message> 
    <attachments> 
     <fileset dir="E:\mail\cucumber\target\cucumber-junit-report"> 
      <include name="**/*.zip"></include> 
     </fileset> 
    </attachments> 
    </mail> 
</target> 

回答

0

邮件任务需要一个单一的cclist="..."属性或一个或多个<cc>元素,所以你需要

<cc address="[email protected]"></cc> 
0

<立方厘米/>相当于< cclist />但使用它时,该参数指定为嵌套元素。

来源:蚂蚁的邮件任务