[ 
https://issues.apache.org/jira/browse/GERONIMO-5042?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hendrik Saly resolved GERONIMO-5042.
------------------------------------
    Resolution: Duplicate
      Assignee: Hendrik Saly

> geronimo-javamail_1.4_spec-1.3,jar broken wrt to Mail Header (Multipart)
> ------------------------------------------------------------------------
>
>                 Key: GERONIMO-5042
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-5042
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: specs
>            Reporter: Marc Logemann
>            Assignee: Hendrik Saly
>
> Dont know if this is the right spot to post this one. I am just guessging 
> because of the JAR name.
> I have used this jar: geronimo-javamail_1.4_spec-1.3,jar which was a 
> transitive dependency on Apache CXF. With this JAR, the following code 
> creates a broken email, whereas the same code with JavaMail works as expected:
> Multipart multipart = new MimeMultipart();
>         MimeBodyPart mbp1 = new MimeBodyPart();
>         mbp1.setText(message);
>         multipart.addBodyPart(mbp1);
>         MimeBodyPart mbp2;
>         for (Attachment attachment : attachments) {
>             mbp2 = new MimeBodyPart();
>             DataSource ds = new 
> ByteArrayDataSource(attachment.getByteArrayData(), attachment.getMimeType());
>             mbp2.setDataHandler(new DataHandler(ds));
>             mbp2.setFileName(attachment.getFilename());
>             multipart.addBodyPart(mbp2);
>         }
>         mimeMessage.setContent(multipart);
>         Transport.send(mimeMessage);
> This code results in the following email, which is totally broken. Missing 
> header fields and no multipart definition but the two parts are there. 
> Resulting in a plaintext email where you can see the boundaries of the parts 
> and the attachment as BASE64 inline text. Here is what you get in terms of 
> email content (shortened the attachments):
> EHLO PC_RIEMER
> 250-xxx.xxx.xxx
> 250-PIPELINING
> 250-SIZE
> 250-VRFY
> 250-ETRN
> 250-STARTTLS
> 250-AUTH PLAIN LOGIN
> 250-AUTH=PLAIN LOGIN
> 250-ENHANCEDSTATUSCODES
> 250-8BITMIME
> 250 DSN
> DEBUG SMTP: Found extension "PIPELINING", arg ""
> DEBUG SMTP: Found extension "SIZE", arg ""
> DEBUG SMTP: Found extension "VRFY", arg ""
> DEBUG SMTP: Found extension "ETRN", arg ""
> DEBUG SMTP: Found extension "STARTTLS", arg ""
> DEBUG SMTP: Found extension "AUTH", arg "PLAIN LOGIN"
> DEBUG SMTP: Found extension "AUTH=PLAIN", arg "LOGIN"
> DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
> DEBUG SMTP: Found extension "8BITMIME", arg ""
> DEBUG SMTP: Found extension "DSN", arg ""
> DEBUG SMTP: use8bit false
> MAIL FROM:<[email protected]>
> 250 2.1.0 Ok
> RCPT TO:<[email protected]>
> 250 2.1.5 Ok
> DEBUG SMTP: Verified Addresses
> DEBUG SMTP:   [email protected]
> DATA
> 354 End data with <CR><LF>.<CR><LF>
> ------=_Part_0_20100806.1264157114437
> Content-Type: text/plain; charset=Cp1252
> Content-Transfer-Encoding: 7bit
> ==============================================
>  automatisch generierte Email von Netversys
>     Abrechnungslauf DHL Europack National
> ==============================================
> Der Abrechnungslauf f?r DHL Europack National ist erfolgreich
> beendet worden. Die Abrechnung ist der Email angeh?ngt.
> Nachfolgend die Auflistung aller Sendungen die abgerechnet wurden:
> # created by NETVERSYS v2.3.2 on 22.01.2010 11:45.14 #
> ------=_Part_0_20100806.1264157114437
> Content-Type: text/plain; name=599_DHL_Abrechnung_63.pdf
> Content-Transfer-Encoding: base64
> Content-Disposition: attachment; filename=599_DHL_Abrechnung_63.pdf
> JVBERi0xLjQKJeLjz9MKNCAwIG9iago8PC9MZW5ndGggODE4L0ZpbHRlci9GbGF0ZURlY29kZT4+
> NjIyCiUlRU9GCg==
> ------=_Part_0_20100806.1264157114437
> Content-Type: text/plain; name=599_DHL_Liste_01_63.pdf
> Content-Transfer-Encoding: base64
> Content-Disposition: attachment; filename=599_DHL_Liste_01_63.pdf
> JVBERi0xLjQKJeLjz9MKMiAwIG9iago8PC9MZW5ndGggNzkzL0ZpbHRlci9GbGF0ZURlY29kZT4+
> M2Y+PDA5MGE1YTRkZTk3NTY2NWRkNDc4ZWFhNzNhYzIxMDA5Pl0vSW5mbyA2IDAgUi9TaXplIDc+
> PgpzdGFydHhyZWYKMTM5MAolJUVPRgo=
> ------=_Part_0_20100806.1264157114437
> Content-Type: text/plain; name=599_DHL_Abrechnung_NN_64.pdf
> Content-Transfer-Encoding: base64
> Content-Disposition: attachment; filename=599_DHL_Abrechnung_NN_64.pdf
> JVBERi0xLjQKJeLjz9MKNCAwIG9iago8PC9MZW5ndGggODE0L0ZpbHRlci9GbGF0ZURlY29kZT4+
> JSVFT0YK
> ------=_Part_0_20100806.1264157114437
> Content-Type: text/plain; name=599_DHL_Liste_NN_64.pdf
> Content-Transfer-Encoding: base64
> Content-Disposition: attachment; filename=599_DHL_Liste_NN_64.pdf
> JVBERi0xLjQKJeLjz9MKMiAwIG9iago8PC9MZW5ndGggNzQzL0ZpbHRlci9GbGF0ZURlY29kZT4+
> U2l6ZSA3Pj4Kc3RhcnR4cmVmCjEzNDAKJSVFT0YK
> ------=_Part_0_20100806.1264157114437--
> .
> 250 2.0.0 Ok: queued as 9C5406857D



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to