Bug 12826 - Cannot attach multiple files to an email...
Summary: Cannot attach multiple files to an email...
Status: CLOSED FIXED
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Mailer Taglib (show other bugs)
Version: 1.0
Hardware: Other other
: P3 major with 1 vote (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-09-19 19:28 UTC by Nadia Mihali
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.