This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to use Java codes to send email with word attachments?  RSS feed

 
Peter Cong
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I have a request to create a java scheduled job to send email with attachment of word document every week. please let me if anybody has any example codes I can use. This is my first time to code this request, I do not what is the standard way to do it, I really appreciate any help, thanks a lot,
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The http://www.coderanch.com/how-to/java/JavaEnterpriseEditionFaq points to lots of materials regarding JavaMail (the standard Java mail API), especially an FAQ and a tutorial that both contain lots of code examples, including the sending of mails with attachments.
 
Peter Cong
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:The http://www.coderanch.com/how-to/java/JavaEnterpriseEditionFaq points to lots of materials regarding JavaMail (the standard Java mail API), especially an FAQ and a tutorial that both contain lots of code examples, including the sending of mails with attachments.


Thanks for your quick response, just did a quick read, it seems the JavaMail API need to be installed in order to use, instead of installing JavaMail API and JavaBean Activation Framework, are there any easy way to send email just use jdk1.6 without download any API?
Since our company's email is using Lotus Notes 8.5 mail system, so if we considering of using Lotus Notes mail in our java web project, can I integrage the Lotus Notes email with our java web application without downloading any java API or third party tool?
Thanks again for your help.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There isn't much to install - it's a few jar files to put into the classpath, which for a web app simply means dropping them into WEB-INF/lib. It doesn't get much easier than that. I would imagine that the Lotus Notes mail API also consists of one or more jar files.
 
Peter Cong
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:There isn't much to install - it's a few jar files to put into the classpath, which for a web app simply means dropping them into WEB-INF/lib. It doesn't get much easier than that. I would imagine that the Lotus Notes mail API also consists of one or more jar files.


Hi, thanks a lot for your help again, if it is easy as you said, I may worth to try it, my java application is a web application which has JSF in front end, with Seam and hibernate and javabean in back end, do you have any detailed instruction how to implement the javamail as you said? or any examples, so I can follow to implement it? thanks again.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The tutorial and FAQ I mentioned have plenty of examples, and should get you going.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!