Solved

Sending an email on pressing a JButton

Posted on 2010-11-11
7
318 Views
Last Modified: 2012-05-10
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 !
0
Comment
Question by:hipal
  • 3
  • 3
7 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 250 total points
ID: 34115678
0
 
LVL 92

Assisted Solution

by:objects
objects earned 250 total points
ID: 34115768
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 34115803
:)
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 92

Expert Comment

by:objects
ID: 34115924
0
 

Author Comment

by:hipal
ID: 34116004
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
 
LVL 92

Expert Comment

by:objects
ID: 34116055
more than likely the comment you accepted will not work (not sure why you accepted it), try the code I posted
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 34116078
You just need a Google account to use the code i linked to
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
topping1 challenge 7 51
Unable to start eclipse ? 17 84
how do i compare an object based on two fields 6 31
Java DateChooser? 2 9
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
A short article about problems I had with the new location API and permissions in Marshmallow
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now