DelphiFAQ Home Search:

Send an Email from a Java applet

 

comments3 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);

Content-type: text/html

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:
2013-01-29, 05:12:59
anonymous from Poland  
sadasdasdasda

 

 

NEW: Optional: Register   Login
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, or post under a registered account.
 

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:

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.

photo Add a picture: