Package java.awt

Examples of java.awt.Desktop.mail()


    boolean sent = false;
    if (Desktop.isDesktopSupported()) {
      Desktop desktop = Desktop.getDesktop();
      try {
        URI uriMailTo = new URI("mailto", "?body=" + content + "&subject=" + title, null);
        desktop.mail(uriMailTo);
        sent = true;
      } catch (Exception e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }
View Full Code Here


          switch (getType()) {
          case BROWSE:
            desktop.browse(getURI(app));
            return;
          case MAIL:
            desktop.mail(getURI(app));
            return;
          }
        } catch (Exception e) {
          getLog().error("Invalid URI", e);
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.