ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Ludwig <mil...@gmx.de>
Subject Re: mail task does not work under ant 1.7.+
Date Thu, 11 Jun 2009 23:15:29 GMT
Laurent Perez schrieb am 10.06.2009 um 12:22:43 (+0200):
> 
> When using encoding=mime, the mail task fails under ant 1.7.0, 1.7.1,
> under jdk5 or jdk6. It works under ant 1.6.5.

It does not fail under Ant 1.7. Just leave mail/@encoding at the default
of "auto", there is no need to change it. It will pick "mime" whenever
necessary.

> The message is :
> java.lang.NoSuchFieldError: headers at [...]

Which is absolutely correct.

> The documentation at http://ant.apache.org/manual/CoreTasks/mail.html
> mentions arbritrary mail headers, without samples - I've tried
> <headers>, it does not work

Then try <header> as per the documentation:

  <header name="X-Holo" value="Schoko"/>

> it also says that <attachments> is supported under ant 1.7.0, but it
> is not : "release.xml:119: The <mail> type doesn't support the nested
> "attachments" element.

Whatever that release.xml file is, it might simply not have been kept in
sync with the code. Attachments work as advertised, albeit with certain
limitations. So I can't see a way to specify the MIME type for
attachments, but then, well, who cares?

  <attachments>
    <fileset dir=".">
      <include name="build.cmd" />
    </fileset>
  </attachments>

Michael Ludwig

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message