> -----Original Message----- > From: Erik Hatcher [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 11, 2001 12:39 AM > To: Ant Developers List > Subject: Re: [SUBMIT] Refactor & combination of mail tasks > > > Wow.... I haven't looked at the details of the code, but if it > all works as > specified here then its a real winner. > > Others will have to be the judge of incorporating it, of course - > but its a > grand idea and one Steve and I had in mind as we got the MimeMail task > included as an optional task. > > Will it still e-mail the text of a file as the body without > uuencoding it as > the <mail> task does? That functionality should still remain > somehow since > folks surely rely on it.... and also multiple text files being > concatenated > into the body.
Of course it's difficult to have the default options match both MimeMail and Mail tasks. Used in the same way, the new version will default to using Mime or UU encoding if available however, this can be overridden if the encoding is set to plain - in which case simple concatenation takes place. The new version does distinguish between a file as the messagebody and files as attachments (closer to MimeMail behaviour I guess) and so even when uu encoding the message body is copied in as plain text. Thinking further, this means that a message (from text or file) is required and a files attribute / fileset alone is not enough. This is not quite the same as the <mail> and so this may need an additional patch... Will check further, Rob > > Erik > > ----- Original Message ----- > From: "Rob Oxspring" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, December 10, 2001 5:18 PM > Subject: [SUBMIT] Refactor & combination of mail tasks > > > > Hi all, > > > > A while back (possibly when MimeMail was submitted) it was > suggested that > > the mail tasks should be integrated into one, using some reflection to > > attempt to use JavaMail. Recently I had a desire to send some binary > > attachments but didn't want to have to install JavaMail on > every developer > > workstation and so UU encoding was hit upon. > > > > The upshot of all this was that I've integrated the three > encoding formats > > into a single task using JavaMail if available or uu encoding (via > > sun.misc.UUEncoder - presumably available to any sun based JDK?). > > > > It should be possible to drop in the new task where the old one was used > and > > not notice the difference. > > > > <project name="emailtest" default="main"> > > <target name="main"> > > <mail message="My message" > > subject="Ant Submission Test"> > > > > <from name="From Rob" address="[EMAIL PROTECTED]"/> > > <to name="To Rob" address="[EMAIL PROTECTED]"/> > > <fileset dir="."> > > <include name="*.xml"/> > > </fileset> > > </mail> > > </target> > > </project> > > > > Magesh: your includefilenames patch caught me mid flow so I've tried to > > patch it in but would appreciate it if you would have a quick check that > > things are coming out OK. Only the PlainMailer is affected by this > > attribute since I didn't know how best to add it into the other formats. > > > > Todo: Probably could find / implement uu encoding but Sun's solution was > > handy and did the trick for now. > > > > Now if things run true to form I'll be back in touch in five > minutes as I > > spot some daft mistake but in the meantime if others could > eyeball it too > it > > would be appreciated. > > > > Hope its deemed good enough... > > > > Rob > > > > > ------------------------------------------------------------------ > ---------- > ---- > > > > -- > > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
