+1 vote
by (750 points)

Hey rebex team my smtp was not working (Iwas not able to send mail) and you advised me to add below line of code in my application which solved the problem and it also made my application to work very fast inspite of having slow imap servers and low network bandwidth, the rebex application for test is working quite fine and well how so any answers are most welcome? is the below line some magic code or so??? and if so then please explain me what the below line of code does??? Thanks

objsmtp.EnabledExtensions &= ~(Rebex.Net.SmtpExtensions.Pipelining
    | Rebex.Net.SmtpExtensions.Chunking);
Applies to: Rebex Secure Mail

1 Answer

0 votes
by (144k points)

Pipelining is an SMTP protocol extension aiming to improve SMTP performance when sending e-mail to multiple recipients by making it possible to send multiple commands without having to wait for a response after sending each of them. See a quick summary or the full specification if you are interested in details.

Chunking is another SMTP protocol extension that defines an alternative to DATA command suitable for sending large messages. It makes it possible to send MIME messages that use binary transfer encoding, it eliminates the need to scan messages for "CR LF . CR LF" sequences upon sending and receiving to detect the end of message, and it makes it easier to gracefully abort sending large messages while they are being uploaded. See the full specification for details.

Unfortunately, some proxy servers, firewalls and antivirus software that inhibits and modifies SMTP communication interfere with these two extensions - they let the server announce to the clients that these extensions are supported, even though they are not actually handled properly by the the proxy/firewall/antivirus.

The line of code disables both of these extensions, making the Smtp object use the old-style SMTP protocol that is a bit more compatible.

Interestingly, we have actually been considering disabling these extensions by default some years ago. However, in the meantime, problems with SMTP-aware software diminished (most vendors fixed their issues) and we finally decided to keep them. Unfortunately, your experience proves that their functionality is still not guaranteed.