0 votes

We are getting this error: Tried to read a line. Only "" received.
I found your blog here https://www.limilabs.com/blog/tried-to-read-a-line-only-received

We do use the smtp.StartTLS(); and smtp.UseBestLogin(Username, Password);
Could these methods experience the same exception?

by (8.8k points)

1 Answer

0 votes
 
Best answer

Could these methods experience the same exception?

Yes they can.

"Tried to read a line" error means that the server is not acting correctly. It doesn't send required data, that it is supposed to be sending.

Sometimes increasing the timeouts may work, which means,
that the client gave up waiting for the server to respond too soon.

Default timeouts are set to 20 seconds. You can use ReceiveTimeout and SendTimeout properties to increase them.

Most common cause of this error however is a connection that was disconnected. There is nothing Mail.dll can do about this. If the connection was interrupted you need to connect again.

Please make sure that you have disabled antivirus and firewall software or that you have configured them correctly. This includes Windows Defender - especially if you use SMTP client. Also AVG antivirus tracks IMAP sessions and interrupts them with no reason.

Double check your credentials, as some servers disconnect as soon as they realize that you provided incorrect login data.

You may also try using SSL (ConnectSSL), if your server supports it as most antiviruses don't interfere with encrypted network traffic.

You can find more details on this error here:
https://www.limilabs.com/blog/tried-to-read-a-line-only-received

by (298k points)
edited by
...