You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-dev@jakarta.apache.org by bu...@apache.org on 2002/09/06 16:20:04 UTC
DO NOT REPLY [Bug 12364] New: -
AttachTag bug
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12364>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12364
AttachTag bug
Summary: AttachTag bug
Product: Taglibs
Version: 1.0
Platform: PC
OS/Version: Windows NT/2K
Status: UNCONFIRMED
Severity: Blocker
Priority: Other
Component: Mailer Taglib
AssignedTo: taglibs-dev@jakarta.apache.org
ReportedBy: dj_sasha@hotmail.com
When you want to attach multiple files to a mail, the number of attachments
(size of the bodyparts collection) is respected but only the last filename of
the collection is always attached.
So if you have 5 attachments, you will have 5 times the last filename attached.
This is the cause of the problem in the AttachTag class:
MimeBodyPart mbp = new MimeBodyPart();
must be changed in:
MimeBodyPart mbp = null;
and in the doAfterBody() method you must make a new isntance of this object at
each time the function is called, namely:
mbp = new MimeBodyPart();
Otherwise if this isn't done that way, the different items of the bodyparts
collection will always point at one point of the memory where a MimeBodyPart is
stored (basic Java knowledge, like pointers in C++)
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>