Jean-Michel, This works fine using a recent NAnt 0.85 nightly build (http://nant.sourceforge.net/nightly/builds) :
<project name="mail"> <mail from="[EMAIL PROTECTED]" tolist="[EMAIL PROTECTED]" mailhost="yourhost" subject="Test" format="Html"> <files> <include name="D:/CVS/nant/doc/faq.html" /> </files> <attachments> <include name="D:/CVS/nant/doc/why.html" /> </attachments> </mail> </project> Filesets (in your case <attachments>) do not support multiple file patterns in one <include(s)> element. We might consider adding a include and exclude attribute to the fileset element itself to support this. So you'd end up with : <mail .... <attachments include="${sys.env.MailDevAttach}" /> </mail> But this is not implemented right now. Please file a feature request (http://www.sourceforge.net/projects/nant) if you'd like this to be implemented. Hope this helps, Gert ----- Original Message ----- From: "Jean-Michel Theriault" <[EMAIL PROTECTED]> To: "Gert Driesen" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, June 28, 2004 5:13 PM Subject: RE: [Nant-users] Need help with <mail task I did check that link before. I wrote my code with exactly the same syntax and I still don't get the file for the body nor the attachments. I do get the e-mail and I even tried it with the message parameter and that works. I was wondering if there is something special that I have to configure to get this to work. Here is the code that I have wich is exactly like the one on the exemple on the link. Does someone have another detailed exemple (that u know works) with one file for the body of the e-mail. <echo message="Before MailDev ... sys.env.MailDev = ${sys.env.MailDev}"/> <echo message="tolist ... ${sys.env.MailDevTo}"/> <echo message="subject ... [${sys.env.ProjectCode}] ${Email.SubjectVerbage} ${Project.Build.Version}!"/> <echo message="files ... ${nant.project.basedir}\${sys.env.ProjectCode}\ResultDev.htm"/> <echo message="attachments ... ${sys.env.MailDevAttach}"/> <mail if="${sys.env.MailDev}" from="[EMAIL PROTECTED]" tolist="${sys.env.MailDevTo}" mailhost="thehost.hosting.ca" subject="[${sys.env.ProjectCode}] ${Email.SubjectVerbage} ${Project.Build.Version}!" format="Html"> <files> <include name="${nant.project.basedir}\${sys.env.ProjectCode}\ResultDev.htm" /> </files> <attachments> <includes name="${sys.env.MailDevAttach}"/> </attachments> </mail> And here is what I get in my log file.... [echo] Before MailDev ... sys.env.MailDev = true [echo] tolist ... [EMAIL PROTECTED] [echo] subject ... [???] Build FAILED... 9.0.0.0302! [echo] files ... T:\gfgf\build\frofro\ResultDev.htm [echo] attachments ... frofro\VSSCheckedOut.log,frofro\build.log,t:\gfgf\Build\compile.log,t:\gfgf\ releasenotes.txt The given path's format is not supported. BUILD FAILED Nested build failed. Refer to build log for exact reason. Thank you again for your patience with me...!! I'm new to NAnt Jean Michel Thériault [EMAIL PROTECTED] ________________________________ From: Gert Driesen [mailto:[EMAIL PROTECTED] Sent: Saturday, June 26, 2004 12:52 PM To: Jean-Michel Theriault; [EMAIL PROTECTED] Subject: Re: [Nant-users] Need help with <mail task Jean-Michel, Body files should be specified using the fileset element named <files>. See http://nant.sourceforge.net/nightly/help/tasks/mail.html for more information, and an example. Hope this helps, Gert ----- Original Message ----- From: Jean-Michel Theriault <mailto:[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Sent: Friday, June 25, 2004 5:07 PM Subject: [Nant-users] Need help with <mail task When I use the <mail task I'm able to receive the email with the subjet correctly but I can't seem to get the file for the body to show. Here's my code. I just need an exemple with the body(fileset) that works. <mail if="${sys.env.MailDev}" from="[EMAIL PROTECTED]" tolist="${sys.env.MailDevTo}" mailhost="exchange4.cactus.ca" subject="[${sys.env.ProjectCode}] ${Email.SubjectVerbage} ${Project.Build.Version}!??????" format="Html"> <fileset> <includes name="${nant.project.basedir}\${sys.env.ProjectCode}\ResultDev.htm" /> </fileset> </mail> Thank you ! Jean Michel Thériault [EMAIL PROTECTED] ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com _______________________________________________ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users