DelphiFAQ Home Search:

Send an Email from a Java applet

 

comments2 comments. Current rating: 4 stars (1 votes). Leave comments and/ or rate it.

Question:

How do I send an email from my java applet?

Answer:

Here's an easy shortcut using the mailto: protocol handler. You can add arguments to the url using the subject and body field.

For full control, research the Java mailAPI.

try {
   URL mail = new URL("mailto: billgates@macrosoft.com?subject=my subject&body=my message text");
}
catch (MalformedURLException e) {
  System.err.println("Invalid URL");
}
     
getAppletContext().showDocument(mail);

Comments:

2005-11-25, 06:54:43
irowatt@intercoast.com.au from Australia  
rating
hello 1154
2006-07-31, 05:18:31
anonymous from United States  


Keywords:

 

 

Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option.
 
It seems that you are
from Washington, US .

Info/ Feedback on this

Show city and country
Show country only
Hide my location
Leave your comment here:
Please type in the code:
photo Add a picture:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity. The owner of this web site reserves the right to delete such material.