0 votes

We have a web project.From localhost we can send email with over 3 MB attachment.But when we publish the project to our server, we get this error :"Tried to read a line. Only '' received. Please make sure that antivirus and firewall software are disabled or configured correctly." Also, we can send emails which have small size attachments from both server and localhost.
We increased the "ReceiveTimeout" but still we get the same error.

Thanks,

by

1 Answer

0 votes

I'm afraid that the problem may be with your server - are you sure you are allowed to send emails with size exceeding 3MB.

If you are sure about it, turn on logging:
https://www.limilabs.com/blog/logging-in-mail-dll

Can you try disabling chunking:

using (Smtp client = new Smtp())
{
    client.Configuration.EnableChunking = false;

...and pipelining:

using (Smtp client = new Smtp())
{
    client.Configuration.EnableChunking = false;
    client.Configuration.EnablePipelining = false;
by (297k points)
...