Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Help needed on Java Mail

  Asked By: Jimmy    Date: Apr 18    Category: Java    Views: 1390

I want to use java mail in one of my application. I have no idea at how irt
works and what are the requirements for it to work. Can anybody help me in this



2 Answers Found

Answer #1    Answered By: Samuel Costa     Answered On: Apr 18

you not clear that which tech. you want to use.there is more option for
that perpuse in java.
you can use servlets programming for mail  and chating server.
you want in more detial then please wait few days.

Answer #2    Answered By: Dirck Jansen     Answered On: Apr 18

U can use the steps as below:

- import classes from javax.mail and javax.mail.internet packages
- create a Properties object and put value of smtp host in its property
"mail.smtp.host". Please note that this host should be able to/configured to
send mails outside
- create a Session object with this property, like Session session =
Session.getDefaultInstance([prop obj],null)
- create a message object using session object, like Message msg = new
- set from, to, subject, text using appropriate set methods on msg object.
- Use the static send method of Transport class to send mail.

Didn't find what you were looking for? Find more on Help needed on Java Mail Or get search suggestion and latest updates.