Topic:Why can't a recipient using Lotus Notes see the attachment of my mail
created and sent with the JAVA Mail API?
Hi everyone,
I have created Multipart Message to send to different mail users. The
problem is now that the recipient using Lotus Notes can't see the
attachment, whereas Outlook has no problem. Here is my code snippet:
MimeMessage message = new MimeMessage(session);
message.setFrom(new InternetAddress("ulrich@sender.com"));
message.setRecipient(Message.RecipientType.TO,
new InternetAddress("ulrich@recipient.de"));
Multipart multipart = new MimeMultipart();
//here I create the body content of the mail
String body = "<html><body>That's a test</body></html>";
BodyPart bodyPart = new MimeBodyPart();
bodyPart.setContent(body, "text/html");
multipart.addBodyPart(bodyPart);
//here I create one attachment for the mail
File file = new File("C:/test/ex.pdf");
InputStream is = new FileInputStream(file);
BodyPart attachmentBodyPart = new MimeBodyPart();
DataSource source = new ByteArrayDataSource(is, "application/x-any");
attachmentBodyPart.setDataHandler(new DataHandler(source));
attachmentBodyPart.setFileName("ex.pdf");
multipart.addBodyPart(attachmentBodyPart);
message.setContent(multipart);
javax.mail.Transport.send(message);
I would be very thankful if you could help me.<BR>
Regards, Klaus
isamura - 20 Jan 2006 16:08 GMT
: Topic:Why can't a recipient using Lotus Notes see the attachment of my mail
:
[quoted text clipped - 7 lines]
:
: attachment, whereas Outlook has no problem. Here is my code snippet:
Could the problem be Notes setting to drop or disable attachments?
.k
Klaus Baumgart - 20 Jan 2006 16:48 GMT
No, it couldn't. Becourse Email which created by outlook comes with all
attachments to the lotus email-client.
> : Topic:Why can't a recipient using Lotus Notes see the attachment of my mail
> :
[quoted text clipped - 11 lines]
>
> .k
Thomas Weidenfeller - 20 Jan 2006 16:56 GMT
> No, it couldn't. Becourse Email which created by outlook comes with all
> attachments to the lotus email-client.
Then get such a working email, compare it (headers, structure, MIME
types, etc.) with a non-working one and figure out where they are different.
/Thomas

Signature
The comp.lang.java.gui FAQ:
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
http://www.uni-giessen.de/faq/archiv/computer-lang.java.gui.faq/
Roedy Green - 20 Jan 2006 22:20 GMT
On Fri, 20 Jan 2006 16:26:55 +0100, "Klaus Baumgart"
<news@dvberatung.com> wrote, quoted or indirectly quoted someone who
said :
>I have created Multipart Message to send to different mail users. The
>
>problem is now that the recipient using Lotus Notes can't see the
>
>attachment, whereas Outlook has no problem. Here is my code snippet:
To solve that sort of problem you want to snoop on the message sent.
See http://mindprod.com/jgloss/sniffer.html
Look at messages that Lotus can eat and look at ones it can't. Once
you know the difference, you will be in a must better position to
bludgeon JavaMail into producing ones Lotus Notes likes.

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.