Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JavaMail Help

 
Hasnain Javed
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Every one,
I am asigned a task which involves JavaMail. I have read some example code from the internet and read the API sepcifications for JavaMail presented in java's website. The explanation is not clear enough ( may be because of lack of knowledge ). Can any one sepcify a good site or a reference that explains it in clear and detailed way. An early response will be highly appreciated.Waiting for a favorable reply.
Regards.
Hasnain.
 
Daniel Rhoades
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you wanting to use JavaMail with an application inside an application server?
 
Hasnain Javed
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello.
Thank you for your kind response. The thing is that my cousin needs to launch a website and also has rented a Hosting.Some forms are supposed to collect information from the user and send an email to his email account.So i guess that is going to be a Yes.Waiting for a favorable reply.
Regards.
Hasnain
 
Daniel Rhoades
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well some application servers use JavaMail (i.e JBoss) for other things, that config file is $JBOSS_HOME/server/default/deploy/mail-service.xml. Getting the server to manage JavaMail sessions is much easier than doing it in your app.

If your cousin has managed hosting, then its worth asking if a JavaMail service is available. You can then get a JavaMail session via JNDI (default is usually mail/JavaMailSession) in your application.

Then in your code just create a MimeMessage and send it [Transport.send(message)]

O'reilly's book "JBoss at Work: A Practical Guide" clearly details getting it working, other than that I found Sun's tutorial docs fairly easy to follow (find them near the API)
[ January 17, 2006: Message edited by: Daniel Rhoades ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!