Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / January 2006

Tip: Looking for answers? Try searching our database.

Java mail API

Thread view: 
Klaus Baumgart - 20 Jan 2006 15:26 GMT
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.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.