Re: Socket problem



On Thu, 09 Mar 2006 20:41:26 GMT, Loek Raemakers wrote:
I want tot add a mailfunction to my java-application. The
application runs on an local nework.Students use it to sign up; the
application places them in groupes, and on lists/ waitinglists. I
want to send them by mail these lists. I use a Socket connection,
from the local network to the mailserver.

[...]

It seems as if a direct socket connection is not possible.

If a direct socket connection were not possible, how do you think
anyone *ever* manages to send mail?

Since you haven't given any indication *how* it fails, here are some
clues to help you help yourself:

- read RFC2821 describing SMTP. In particular, make sure you are
sending the correct line endings (CRLF) after each command, instead
of hoping that PrintStream gets it right.

- read and display the server's responses to your commands in order to
get an idea of what is failing.

That said, you might consider using JavaMail instead of reinventing
the wheel.

/gordon

--
[ do not email me copies of your followups ]
g o r d o n + n e w s @ b a l d e r 1 3 . s e
.



Relevant Pages

  • Socket problem
    ... I want tot add a mailfunction to my java-application. ... groupes, and on lists/ waitinglists. ... I use a Socket connection, from the local network to the mailserver. ...
    (comp.lang.java.programmer)
  • Re: IO::Socket problem
    ... > from the server, to the command I'm issuing, results in multiple lines so ... the cursor just hangs and nothing is printed. ... block because in checking for eof you still have to read from the socket. ... socket connection. ...
    (comp.lang.perl.misc)
  • On AIX 5.2, how can the system operator close a socket connection established by a specific process?
    ... is there any way or command for system operators to ... close a socket connection established by a specific process without ... killing the process? ...
    (comp.unix.aix)