*** publish.py.orig Mon Oct 13 01:44:48 2003 --- publish.py Mon Oct 13 01:45:55 2003 *************** *** 11,16 **** --- 11,17 ---- import time, types, socket, re, warnings import cgi import struct + import smtplib try: import zlib # for COMPRESS_PAGES option except ImportError: *************** *** 416,430 **** def mail_error (self, msg, error_summary): """Send an email notifying someone of a traceback.""" ! cmd = "/usr/lib/sendmail '%s'" % self.config.error_email ! pipe = os.popen(cmd, 'w') ! pipe.write('Subject: Quixote Traceback (%s)\n' % error_summary) ! pipe.write('From: %s <%s>\n' % (socket.gethostname(), ! self.config.error_email)) ! pipe.write('To: %s\n' % self.config.error_email) ! pipe.write('\n') ! pipe.write(msg) ! pipe.close() def get_namespace_stack (self): """get_namespace_stack() -> [ module | instance | class ] --- 417,433 ---- def mail_error (self, msg, error_summary): """Send an email notifying someone of a traceback.""" ! host = socket.gethostname() ! mailfrom = 'Quixote on %s ' % (host,host) ! ! mail = 'Subject: Quixote Traceback (%s)\n' % error_summary ! mail += 'From: %s\n' % mailfrom ! mail += 'To: %s\n' % self.config.error_email ! mail += '\n' ! mail += msg ! ! smtp = smtplib.SMTP(self.config.mail_server) ! smtp.sendmail(mailfrom,self.config.error_email,mail) def get_namespace_stack (self): """get_namespace_stack() -> [ module | instance | class ]