-----Original Message----- From: Stephen Pitts [mailto:smpitts@midsouth.rr.com]
I was having lots of trouble with <dtml-sendmail>, and I investigated the code for MailHost. Instead of using the excellent smtplib module (that ships with Python) to send EMail, the folks at DC decided to write their own, using sockets.
We wrote it before the smtplib module was standard in Python.
The attatched patch replaces 100+ lines of socket-based code with 2 line calls to smtplib. I think that this will improve the reliability of MailHost dramatically. As a side effect, the timeout and localhost properties of MailHosts are gone.
A 98% code reduction. Not bad.
So far, the basic <dtml-sendmail> tag works perfectly. Someone try this out and tell me what you think.
If someone can verify that this works I'll eye it and check it in (send it to me directly as a reminder) -Michel