- Apr 17, 2003
- 910
- 0
- 0
SMTP Pipelining is a common feature supported on most modern email servers. It allows the client to send commands in a group without having to wait for a response to each command, thus making for a quicker transaction. I've read the RFC but it does not get into technical detail about implementation of pipelining.
My question is: How do you send the commands to the server as a "batch" vs one-by-one to take advantage of pipelining if you are trying to program an email client?
For example:
You start with EHLO, the client sees '250 PIPELINING' as one of the supported features. At this point you could initiate the email sending process. Below, you are sending the same email to 3 recipients.
MAIL FROM: <email> \r\n
RCPT TO: <email> \r\n
RCPT TO: <email> \r\n
RCPT TO: <email> \r\n
DATA \r\n
The problem I am having is sending those commands as a batch - in other words, all in one shot without having the server ack each command. Right now, because of the \r\n required after each command, the server sends a response immediately after receiving each command and I am pretty sure that is not how pipelining is supposed to work. How do I send the commands from within my program so that the server accepts them as a batch and does not respond until I send the DATA command as per RFC?
My question is: How do you send the commands to the server as a "batch" vs one-by-one to take advantage of pipelining if you are trying to program an email client?
For example:
You start with EHLO, the client sees '250 PIPELINING' as one of the supported features. At this point you could initiate the email sending process. Below, you are sending the same email to 3 recipients.
MAIL FROM: <email> \r\n
RCPT TO: <email> \r\n
RCPT TO: <email> \r\n
RCPT TO: <email> \r\n
DATA \r\n
The problem I am having is sending those commands as a batch - in other words, all in one shot without having the server ack each command. Right now, because of the \r\n required after each command, the server sends a response immediately after receiving each command and I am pretty sure that is not how pipelining is supposed to work. How do I send the commands from within my program so that the server accepts them as a batch and does not respond until I send the DATA command as per RFC?