Sending an email on pressing a JButton

Hi,

I was wondering if this is really easy to do.
On clicking a JButton, I want a blank email to be sent to a predefined email add.
Can some please give the code snippet to be inserted in actionlistener to achieve this.

Actually I even want a textarea to write mail and email id, but if some one can just tell the easier version that is jst sending a mail .. I can take from there.

Thanks a lot !
hipalAsked:
Who is Participating?
 
CEHJCommented:
:)
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
objectsCommented:
0
 
hipalAuthor Commented:
I am not sure about mail servers and stuff.

I do not know which one (or if one) I should use. All I want to do is to send a mail on pressing a JButton.

Please suggest which is the best and easy out ?
0
 
objectsCommented:
more than likely the comment you accepted will not work (not sure why you accepted it), try the code I posted
0
 
CEHJCommented:
You just need a Google account to use the code i linked to
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.