• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Java Mail - how to do proxy settings?

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am building a simple application for sending and receiving mails using Java Mail API.
I am using a proxy server for connecting to the internet. We are having a LAN connection. When I run a simple send message application on the PC which is directly connected to internet the application RUNS FINE.
But when I run it on a pc which is on the LAN and using proxy server for internet connection, the example DOES NOT WORK and THROWS EXCEPTIONS.
Does anyone know how to do the settings if one is proxy server?
Can anyone please help me?
Thanks in advance.
Vivek
 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
More probably you need to mess with the LAN and server not your code...
What you would have to do relates specifically to how the network is set up. I have written Net apps that work fine on my modem link at home as well as the LAN in work.
It could be a lot of things�..perhaps you only have access to port 80 for internet�nothing else? It�s hard to pin down without knowing the LAN.
 
vivek makode
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply.
You are right pal I know I dont have to mess with code. I know that the problem is with LAN settings in Windows NT.
We are using port 81 for internet connection. Do u think there is any problem with port 81?
Where exactly do u think is the problem? I am not much familiar with LAN and networking.
Can u help?
Vivek
 
Jared Krull
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmm....
You say you have a prog that sends and recieves mails huh??
Therefore I assume you are using SMTP and POP3??
Open Telnet, and connect to your mailserver for sending on port 25. If you connect you should get a reply with "250" in it. Do the same for your POP3 server, but this time connect to port 110.
In the reply you should get a response with "+OK" in it.....
If for whatever reason you can't do the above, then it could be that your LAN has a firewall that is blocking those ports....If this is the case - your stuck. No mail programs will be able to access these ports.
If you can connect to these ports then....???
------------------
C programmer gone astray
 
Did Steve tell you that? Fuh - Steve. Just look at this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic