I would like to multithread sending mail (using django’s SMTPConnection or perhaps the smtplib module). I was hoping there was a module similar to urllib2 where I can:
import eventlet
from eventlet.green import urllib2
except using smtplib instead of the urllib2 import. However, this does to appear to supported. I read this could monkey patched(?), but I am unsure how to proceed. Any ideas how this can be accomplished with eventlets? Or do I have to drop down into the python Thread class, etc.
Use
Or
Either should work for you.
http://eventlet.net/doc/patching.html