Could some networking guru please help me? My application is trying to
send emails via SMTP. To do this, a SMTP server has been installed
with username and password and my application, at the time of sending
the message, allows the user to add 'From' and 'To' strings, in
addition to the IP address of the email server.
The email application creates a socket to the server and binds without
any problems. However, when it is supposed to connect, using a wrapper
around the standard Linux function 'connect' it fails to do so, giving
an error 145, i.e., timeout error. I am only trying to send simple
test messages with my application.
If I capture packets (using Wireshark) on the machine on which the
email server is running, I find that although a connection is
established between my application and the server immediately after my
application has initiated a session, instead of responding to the
server's ACK, it sends a RST.
What is confusing is that I get a socket error 145, but initially a
connection is established, to be broken immediately after.
Any hints or suggestions would be greatly appreciated. Thanks in
advance for your help.