Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Java Mail - specifying client connection  RSS feed

 
Agador Paloi
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working on a client swing application that send and receives data via satelite using Java Mail . The java mail seems to work fine. The problem is a requirement that allows the client to specify which connection on their machine to use for javamail . They may have a dialup and broadband connection they can use . I need to be able to specify the dial up if they request it. I have looked at the Transport, Session , NetworkInterface classes and only see the mail server connection can specified.

Any hints or ideas would be appreciated
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is an unusual situation. It's generally up to the OS to establish a connection (usually at the behest of a user) if there is none. The JVM does not have access to that kind of network awareness (although I suppose using JNI it could).

Either way, I don't think it's possible to specify the connection for one particular application, and have everything else use a different one.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!