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?

[Webinar] Streamline your web hosting managementRegister Today

x
 
CEHJCommented:
:)
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
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
All Courses

From novice to tech pro — start learning today.