Results 1 to 3 of 3
  1. #1
    thedude is offline Member
    Join Date
    Jul 2007
    Posts
    2
    Rep Power
    0

    Default Sending a mail with the local mail program

    hi,

    i'd like to start the local mail program with a given mail address out of a swing application by pressing a button after the address was entered but i've no idea how i can start a mail program with a predefined address.

    i'd be thankful for every hint ;)

  2. #2
    JavaBean's Avatar
    JavaBean is offline Moderator
    Join Date
    May 2007
    Posts
    1,270
    Rep Power
    9

    Default

    There is no built-in support for this in Java. You may try an existing Java library to do this or create it yourself. If you will do this yourself, you will need to learn JNI and call native methods to call the platform dependent method from Java.

    Alternatively, this might work: When i open Start->Run on windows and pressing ENTER after typing "mailto:dd@dd.com" (without quotes), the system opens the default mail client as you wish. So at least for windows, you can try to execute that command (mailto:dd@dd.com) from Java using Runtime.exec() call. Check following tip for details:

    Java Tips - How to execute a command from code

  3. #3
    thedude is offline Member
    Join Date
    Jul 2007
    Posts
    2
    Rep Power
    0

Similar Threads

  1. a problem about java mail client program
    By lunarstyle in forum AWT / Swing
    Replies: 9
    Last Post: 12-19-2009, 04:14 PM
  2. mail
    By indirani in forum New To Java
    Replies: 4
    Last Post: 04-11-2008, 01:12 PM
  3. Sending Mail Using Sockets
    By Java Tip in forum java.net
    Replies: 0
    Last Post: 04-07-2008, 08:05 PM
  4. Retreiving of mail body using mail number
    By chandu.v09 in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 03-13-2008, 02:25 PM
  5. Sending mail Using JAVAMAIL
    By peiceonly in forum Advanced Java
    Replies: 3
    Last Post: 07-19-2007, 02:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •