Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET SMTP

 AfterLogic Forum : MailBee.NET SMTP
Subject Topic: Smtp mailer.Disconnect() Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
slg23
Newbie
Newbie


Joined: 27 February 2014
Location: Slovenia
Online Status: Offline
Posts: 1
Posted: 27 February 2014 at 1:37am | IP Logged Quote slg23

If mailer.IsConnected Then
mailer.Disconnect()
End If

mailer.Disconnect() error: IOException occurred. InnerException message follows: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
Back to Top View slg23's Profile Search for other posts by slg23
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 27 February 2014 at 1:57am | IP Logged Quote Igor

Please see the extract from Smtp.IsConnected Property documentation page:

Quote:
This property only reflects the state of client side of the connection. If the server forcibly closed the connection on its side, the application won't know about this until it makes an attempt to send or receive data.

In other words, it reflects the state of the connection at the time when the last data to the moment was received.

To check if you're still connected to the server from its point of view, issue a command to the server, such as Noop. If the method throws an exception, this means the server has closed the connection. If no exception occurred, the connection is still up.


Hope this explains what's going on.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide