Is there something i'm missing?
Quite possibly.
Simply put PIPELINING
is sending SMTP commands without waiting for the responses. It doesn't tend to be implemented because the benefits are marginal and it increases the complexity of error states.
From your comment, it sounds as if you are worried that only one message will be sent through one connection. This is not PIPELINING
.
smtplib
supports using the same connection for multiple messages. You can just call sendmail
multiple times. E.g.
s = smtplib.SMTP("localhost")
s.sendmail("[email protected]",["[email protected]"],message1)
s.sendmail("[email protected]",["[email protected]"],message2)
Final update
which is the max number of messages i can append "per-connection" ?
This varies between SMTP daemons. Exim seems to default to 1000.
do i have to do this synchronously or does smtplib eventually handle contemporary sendmail calls ?
The call to the sendmail
method will block until complete, your calls will be sequential.
If you need to parallelize then you might need to look at threading, multiprocessing or perhaps twisted. There are many possible approaches.
The number of concurrent connections you are allowed may also be an SMTP daemon configuration item.