View Full Version : Socket java help
tricolaire
08-12-2005, 01:10 AM
I'm using java
how do I connect to a password protected server
like, lets say I want to connect to my e-mail account at verizon.
I would usually log in to netmail.verizon.net
how would I transmit my password through java?
How do you talk to someone who speaks Hebrew? You speak to them in Hebrew. Similarily, when you talk to any server, you talk in a language it understands. This is called Protocol in technical terms.
You have to use the protocol that the target server uses. In the case of the server you provided, it is using a web interface to get the mail. So you would use HTTP protocol for this. This may not be an easy task for a beginner unless you are using pre-written classes.
On the other hand, most mail is routed through an SMTP server and is accessible by connecting directly to it. SMTP is a very simple protocol, so if you can find out the server name for your mail, you can connect to your SMTP server and check your mail from your java program without a lot of effort.
tricolaire
08-12-2005, 02:18 AM
just wondering, but could I just use the getInputStream and getOutputStream methods of the socket class and the corresponding Data input and output streams to send/recieve the information from the server?
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.