Bug 12826

Summary: Cannot attach multiple files to an email...
Product: Taglibs Reporter: Nadia Mihali <nmihali>
Component: Mailer TaglibAssignee: Tomcat Developers Mailing List <dev>
Status: CLOSED FIXED    
Severity: major    
Priority: P3    
Version: 1.0   
Target Milestone: ---   
Hardware: Other   
OS: other   

Description Nadia Mihali 2002-09-19 19:28:54 UTC
Hi, I'm trying to attach multiple files to an email in a JSP page, but I only 
get the last file attached as many times as number of files I need to attach.
For instance, in the code below, I'm trying to attach 2 files. The email gets 
sent with 2 attachements, both being "FileName2.doc".
Please help !

<%@ taglib uri="http://jakarta.apache.org/taglibs/mailer-1.0" prefix="mt" %>

....................

<mt:mail session="mail/MailSession" from="blabla@xxx.com">
  <mt:subject>Attach 2 files...</mt:subject>
  <mt:setrecipient type="to">bbbb@xxx.com</mt:setrecipient>
  <mt:message>Please read the below 2 files.</mt:message>
  <mt:attach file="FileName1.doc"/>
  <mt:attach file="FileName2.doc"/>
  <mt:send/>
</mt:mail>


Thank you.
Comment 1 Glenn Nielsen 2002-10-31 05:17:13 UTC
Please try the latest nightly build 20021031 or later to see
if this fixes your problem.  This bug may have been triggered
if you were using a servlet container like Tomcat 4.1 which
does JSP custom tag pooling.  Please let me know if the new
mailer taglib fixes the problem.
Comment 2 Glenn Nielsen 2002-12-03 16:08:04 UTC
I found a bug in the attach tag lifecycle which could cause
the attach tag to not work when there was no body content in
some JSP Engines such as Tomcat 4.1 with Jasper 2.

The bug fix will be in the next nightly build.