• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Access mail server via Proxy

 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am writing a program that access a POP3 and SMTP mail account using the JavaMail API. The code that I use requires a direct connection between the machine where the program is executing and the Internet. If the machine where the program is executing accesses the web via a proxy server, what necessary information is required and settings should be done for the program to be able to do so? Also I want the settings, if any, to be performed in the program itself. In other words the proxy settings should be made only if the necessary information is provided.
 
Ketan KC Chachad
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
I searched for accessing mail server via proxy and found the following on JGuru.com.


Question How do I configure JavaMail to work through my proxy server?
Answer
Proxy servers redirect HTTP connections, not JavaMail connections. In order to connect from behind a firewall for POP3, IMAP, and SMTP access, you need to connect to a SOCKS server. Your sys admin should provide you with SOCKS client software, to install on your client machine. (Hummingbird, for instance, for Windows; various clients for Solaris; I think Linux, at least RedHat, already comes with a SOCKS client?) The SOCKS versions have to match, on the client and SOCKS server.
It's transparent to network applications, e.g. they just think they are making normal connections, but the TCP stack internally tunnels these through SOCKS instead. So the only thing to configure is the SOCKS client software on the host.


Now can anyone help me with this? I want to know how do I make a connection to a SOCKS server in my program?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic