Ant任務發送郵件 - 郵件類型不支持嵌套的「附件」元素。ant任務發送郵件 - 郵件類型不支持嵌套的「附件」元素
我正在使用Maven使用TestNG運行測試自動化腳本。我正在使用maven antrun插件發送帶有測試NG報告的電子郵件。
可惜我不能發送電子郵件attachement並獲得誤差
嵌入式錯誤:郵件>類型不支持嵌套的「附件」元素。
,這裏是我的pom.xml
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<configuration>
<tasks>
<mail
tolist=""
from=""
subject="Report"
mailhost=""
mailport=""
user=""
password="">
<message>Please find the Attached automation report.
Note: This is an automatic generated e-mail
</message>
<attachments>
<fileset dir="target">
<include name="**/*.html"/>
</fileset>
</attachments>
</mail>
</tasks>
</configuration>
<phase>test</phase>
<id>SentEmail</id>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>