File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

sample code for java mail api with attachment

 
zeetha lakshmi
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,

Any one guide me, how can i send mail with pdf attachment using java source(Java mail API).

Thanks & Regards
Zeetha.
 
Punit Jain
Ranch Hand
Posts: 1012
2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here is the two links, might helps you.

http://www.roseindia.net/javamail/
http://www.javaworld.com/jw-10-2001/jw-1026-javamail.html
 
Paul Clapham
Sheriff
Pie
Posts: 20203
26
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you look in your JavaMail download, you'll find a folder which contains example code. There's an example of how to send mail, including mail with attachments.
 
zeetha lakshmi
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,

Thanks for your reply. Now i can sent mail with attachment using following code.

 
Nam Ha Minh
Ranch Hand
Posts: 502
Eclipse IDE Firefox Browser Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi zeetha,

You can improve your code as a reusable component, like this.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic