1)Build.xml(我已尝试使用两个Zip destfile)
<target name="sendMail" depends="makexsltreports">
<zip destfile="${basedir}/XSLT_Reports/output.zip" basedir="${basedir}/XSLT_Reports"/>
<!--zip destfile="D:\drive d\Script\Invoice\XSLT_Reports\output.zip" basedir="D:\drive d\Script\Invoice\XSLT_Reports"/ -->
<mail
tolist="xyz@abc.in"
from="abc@gmail.com"
subject="Invoice report"
mailhost="smtp.gmail.com"
mailport="465"
ssl="true"
user="abc@gmail.com"
password="xyz">
<attachments>
<fileset dir="${project.dir}/XSLT_Reports/">
<include name="**/*.zip"/>
</fileset>
</attachments>
</mail>
</target>
2)cmd Promt显示在
下面sendMail:
[zip] Building zip: D:\drive d\Script\Invoice\XSLT_Reports\output.zip
[mail] Failed to send email: D:\drive d\Script\Invoice\${project.dir}\XSLT_
Reports does not exist.
3)文件夹结构
D:\drive d\Script\Invoice\XSLT_Reports\output
问题:Zip已创建为output.zip但无法发送邮件..
任何回复都会很明显。如果需要任何其他细节,请告诉我..