File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other JSE/JEE APIs and the fly likes Create new email message Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Create new email message" Watch "Create new email message" New topic

Create new email message

Tom Wheeler

Joined: Apr 23, 2004
Posts: 8
I want to create a new email message when the user hits a certain button. I have looked through the API for 1.4.2, and I'm not quite sure what I'm looking for. I just want the button to call the default email client and populate the "To:" field from String in a JTextField.
Basically its like when you hit a "mailto:" link in an html page, but in a Java app. How do I do it?
Joe Ess

Joined: Oct 29, 2001
Posts: 9189

You aren't finding it because that functionality isn't in the J2SE. That functionality is in the J2EE, the JavaMail API to be exact. Very popular subject in the Other Java APIs forum.

[How To Ask Questions On JavaRanch]
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199

Joe's right. I'm moving this thread over there for followup.

[Jess in Action][AskingGoodQuestions]
Brian Pipa
Ranch Hand

Joined: Sep 29, 2003
Posts: 299

is a really easy way to email in Java.


My Java Freeware:<br />MACCC - <a href="" target="_blank" rel="nofollow"></a><br />Nator - <a href="" target="_blank" rel="nofollow"></a>
I agree. Here's the link:
subject: Create new email message
It's not a secret anymore!