Bug 17340 - Probl�me envoi mail avec plusieurs pi�ces jointes
Summary: Probl�me envoi mail avec plusieurs pi�ces jointes
Status: RESOLVED WORKSFORME
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Mailer Taglib (show other bugs)
Version: 1.1
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-24 14:55 UTC by master
Modified: 2004-11-16 19:05 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description master 2003-02-24 14:55:20 UTC
Je rencontre des problèmes lors de l'envoi d'un mail contenant plusieurs 
pièces jointes...En effet dans mon application je récupère le nom de X 
fichiers à joindre dans une variable "Fichier", et ensuite je les attache avec 
une boucle while ( code ci-dessous)...Lors de la reception du message je 
reçois X fois le premier fichier joint et non pas les X fichiers uploadés...

<%
while(fichiers.hasMoreTokens()){
String Fichier=(String)fichiers.nextToken();
%>
<mailer:attach file="">
<%=Fichier%>
</mailer:attach>    
<%}%>


Il se trouve par ailleurs que si j'ai uploadé par exemple trois fichiers
et que je les attache un par un, par exemple:

<mailer:attach file="">
<%=Fichier1%>
</mailer:attach>   

<mailer:attach file="">
<%=Fichier2%>
</mailer:attach>   

<mailer:attach file="">
<%=Fichier3%>
</mailer:attach>   

...Les trois fichiers seront correctement mis en pièces jointe
Comment 1 master 2003-02-24 15:03:38 UTC
J'oubliais..Le serveur jsp que j'utilise: 
Jrun 3.1
Comment 2 Marc Guillemot 2004-01-29 08:38:58 UTC
Rough English translation of the bug report: 
(I'm not the bug reporter, "master" please correct if the translation is too bad)

Problem to send email with many attachment

I've got problems by sending an email with many attachments. Indeed, in my
application I hold the names of X files to attach in a variable named "Fichier"
and then I attach them using a while loop (see code below). When receiving the
email, I become X times the first attached file and not the X uploaded files.

<%
while(fichiers.hasMoreTokens()){
String Fichier=(String)fichiers.nextToken();
%>
<mailer:attach file="">
<%=Fichier%>
</mailer:attach>    
<%}%>


If I upload for instance 3 files and attach them one by one, for instance:

<mailer:attach file="">
<%=Fichier1%>
</mailer:attach>   

<mailer:attach file="">
<%=Fichier2%>
</mailer:attach>   

<mailer:attach file="">
<%=Fichier3%>
</mailer:attach>   

... then the 3 files arre correctly attached.


------- Additional Comments From master 2003-02-24 15:03 -------

I forgot. I use JRun 3.1
Comment 3 Martin Cooper 2004-02-02 01:31:40 UTC
This works fine for me. I tried the exact same test, taking the file names from 
a StringTokenizer instance, so that I could use the same looping code as in the 
bug report. All of the files were delivered correctly.