Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Attach file to default mail agent  RSS feed

 
Sergey Muratov
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all!

How can I attach file to default mail client from java?

[ November 17, 2008: Message edited by: Sergey Muratov ]
[ November 17, 2008: Message edited by: Sergey Muratov ]
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

This tutorial has many code examples: http://java.sun.com/developer/onlineTraining/JavaMail/contents.html
 
Sergey Muratov
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, I don't want to send mail from java, I want to open default mail client (Outlook for example) and attach file to its.
JavaMail really allows to do that?
 
Rob Spoor
Sheriff
Posts: 21088
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No it doesn't. You will either have to go native (possibly using an already existing library) or use some external command that can do it. I doubt there is a library or command that can handle all email clients though.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!