[Zope] NeoBoard - Stupid Newbie Questions
Mike Renfro
renfro@tntech.edu
Mon, 15 Jul 2002 21:13:18 -0500
On Tue, Jul 16, 2002 at 10:14:51AM +0900, Wankyu Choi wrote:
> I just wanted to know if I reinvented the wheel, like, there's
> already a way to handle HTML/attachments with MailHosts or
> something. Not DTML.
I'm no product expert (I just got my backside roundly kicked while
trying to factor out some redundant code into a separate product
tonight), but I think you might have reinvented the wheel.
- The MailHost product defines the <dtml-sendmail> tag, whose render()
method calls the send() method on a defined mailhost. I assume that
the sendmail tag takes care of all the MIME encoding before handing
anything off to the mailhost, partially because much of the MIME
business is handled with the <dtml-mime> tag, defined in the
MIMETools product.
- MailHost's send() method takes what appears to be raw message text,
plus some optional headers. It appears that if those headers are not
defined, it'll try to pull them out of the headers in the message
text. The send() method eventually calls the _send() method, which
calls the sendmail() and quit() methods on a defined SMTP server.
To my admittedly untrained eye, that looks pretty much like what
you're doing with the send() method of NB_Mailer.py -- it also appears
that NB_Mailer is importing lots of the same libraries that the mime
tag, sendmail tag, and mailhost product do.
--
Mike Renfro / R&D Engineer, Center for Manufacturing Research,
931 372-3601 / Tennessee Technological University -- renfro@tntech.edu