----- Original Message ----- From: "Aidan" <[EMAIL PROTECTED]>
To: <zope@zope.org>
Sent: Sunday, November 05, 2006 10:28 PM
Subject: [Zope] newbie -- creating a Product

I'm a complete Zope novice. Forgive me if my question is inane.

I need to be able to send an e-mail (following a form submit) with an attachment (and I prefer not to use DTML). I can send e-mails withOUT attachments, but according to this: http://mail.zope.org/pipermail/zope/2005-May/159291.html

I need to create

"a simple product like this:

------------------- contents ---------------------------------
from AccessControl import allow_module, allow_class, allow_type
from AccessControl import ModuleSecurityInfo, ClassSecurityInfo

from email.MIMEText import MIMEText
from email.MIMEMultipart import MIMEMultipart
from email.MIMEBase import MIMEBase
from email.Header import Header
from MailCrypt import signmail
from email.Encoders import encode_base64


This then will allow me to send attachments using

from Products.EmailTools import

in the python script. (Without the EmailTools product Zope tells me I am not
allowed to import MIME*)

This is where my question comes in. I have tried to create the product both from the ZMI (which does not allow the creation of __init__.py's) and via command line (in ~/Products, in lib/Python, everywhere that the sparse and conflicting
information I have been able to gather tells me). Doing the latter I can
certainly create the __init__.py but the Product doesn't register with zope.

Could someone give a quick walk-through (or point to an up-to-date source) on
how to create this Product?

(I am running  Zope 2.8.6-final, python 2.4.3, linux2)

For a single task like you have described it may be easier to create a simple external method.


Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to