From: Jean-Michel T. <Jea...@ca...> - 2004-06-29 15:18:34
|
Hi Gert, I am pleased to say that my attachments now work fine. I created an = <includes> for each file and I get them in the email. Here's what that = looks like: <mail if=3D"${sys.env.MailDev}" from=3D"Rel...@ca..." tolist=3D"${sys.env.MailDevTo}" mailhost=3D"exchange4.cactus.ca" subject=3D"[${sys.env.ProjectCode}] ${Email.SubjectVerbage} = ${Project.Build.Version}!" format=3D"Html"> <attachments>=20 <includes name=3D"t:\3_developing\Build\IVEY\VSSCheckedOut.log"/> <includes name=3D"t:\3_developing\Build\IVEY\build.log"/> <includes name=3D"t:\3_developing\Build\compile.log"/> <includes name=3D"t:\3_developing\releasenotes.txt"/>=20 </attachments> </mail> Now, whenever I add the <files> parameter to this, I don't get the email = anymore. Here's the code for that:=20 <mail if=3D"${sys.env.MailDev}" from=3D"Rel...@ca..." tolist=3D"${sys.env.MailDevTo}" mailhost=3D"exchange4.cactus.ca" subject=3D"[${sys.env.ProjectCode}] ${Email.SubjectVerbage} = ${Project.Build.Version}!" format=3D"Html"> <files> <includes name=3D"t:\3_Developing\build\IVEY\ResultDev.htm"/> </files> <attachments>=20 <includes name=3D"t:\3_developing\Build\IVEY\VSSCheckedOut.log"/> <includes name=3D"t:\3_developing\Build\IVEY\build.log"/> <includes name=3D"t:\3_developing\Build\compile.log"/> <includes name=3D"t:\3_developing\releasenotes.txt"/>=20 </attachments> </mail> So I was wondering if u have any idea as to why this is happening. I = have the latest stable release of NAnt 0.84. Thanks for all the help = your giving me, I really appreciate. If I can just get this <files> = thing to work I'll be done...hope to hear from you!! =A0=A0=A0=A0Jean Michel Th=E9riault =A0=A0=A0=20 =A0=A0=A0=A0=A0 Jea...@ca... -----Original Message----- From: Gert Driesen [mailto:ger...@pa...]=20 Sent: Tuesday, June 29, 2004 1:44 AM To: Jean-Michel Theriault; nan...@li... Subject: Re: [Nant-users] Need help with <mail task Jean-Michel, This works fine using a recent NAnt 0.85 nightly build (http://nant.sourceforge.net/nightly/builds) : <project name=3D"mail"> <mail from=3D"wha...@yo..." tolist=3D"wh...@yo..." mailhost=3D"yourhost" subject=3D"Test" format=3D"Html"> <files> <include name=3D"D:/CVS/nant/doc/faq.html" /> </files> <attachments> <include name=3D"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=3D"${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" <Jea...@ca...> To: "Gert Driesen" <ger...@pa...>; <nan...@li...> 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=3D"Before MailDev ... sys.env.MailDev =3D = ${sys.env.MailDev}"/> <echo message=3D"tolist ... ${sys.env.MailDevTo}"/> <echo message=3D"subject ... [${sys.env.ProjectCode}] ${Email.SubjectVerbage} ${Project.Build.Version}!"/> <echo message=3D"files ... ${nant.project.basedir}\${sys.env.ProjectCode}\ResultDev.htm"/> <echo message=3D"attachments ... ${sys.env.MailDevAttach}"/> <mail if=3D"${sys.env.MailDev}" from=3D"ga...@my..." tolist=3D"${sys.env.MailDevTo}" mailhost=3D"thehost.hosting.ca" subject=3D"[${sys.env.ProjectCode}] ${Email.SubjectVerbage} ${Project.Build.Version}!" format=3D"Html"> <files> <include name=3D"${nant.project.basedir}\${sys.env.ProjectCode}\ResultDev.htm" /> </files> <attachments> <includes name=3D"${sys.env.MailDevAttach}"/> </attachments> </mail> And here is what I get in my log file.... [echo] Before MailDev ... sys.env.MailDev =3D true [echo] tolist ... Jea...@ca... [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:\gf= gf\ 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=E9riault Jea...@ca... ________________________________ From: Gert Driesen [mailto:ger...@pa...] Sent: Saturday, June 26, 2004 12:52 PM To: Jean-Michel Theriault; nan...@li... 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:Jea...@ca...> To: nan...@li... 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=3D"${sys.env.MailDev}" from=3D"bl...@wh..." tolist=3D"${sys.env.MailDevTo}" mailhost=3D"exchange4.cactus.ca" subject=3D"[${sys.env.ProjectCode}] ${Email.SubjectVerbage} ${Project.Build.Version}!??????" format=3D"Html"> <fileset> <includes name=3D"${nant.project.basedir}\${sys.env.ProjectCode}\ResultDev.htm" /> </fileset> </mail> Thank you ! Jean Michel Th=E9riault Jea...@ca... |