DelphiFAQ Home Search:
General :: Programming :: Java :: Applets


Articles:

This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.

Featured Article

Send an Email from a Java applet

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

Generated 16:01:46 on Jan 19, 2017