Thanks, I will try the external method.<br><br>However, what I was really hoping for was an explanation of the<br>Product creation part -- if I can create and get this very simple<br>Product to work, I can begin to understand this facet of Zope and make
<br>more complex Products.<br><br>OK, forget the email attachment detail of my question. I am confused<br>here: I have tried to create the product both from the ZMI (which<br>does not allow the creation of __init__.py's) and via command line
<br>(in ~/Products, in lib/Python, everywhere that the sparse and<br>conflicting information I have been able to gather tells me). Doing<br>the latter I can certainly create the __init__.py but the Product<br>doesn't register with zope.
<br><br>Thanks.<br><br><div><span class="gmail_quote">On 11/6/06, <b class="gmail_sendername">Jonathan</b> <<a href="mailto:dev101@magma.ca">dev101@magma.ca</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>----- Original Message -----<br>From: "Aidan" <<a href="mailto:mnstrmr@gmail.com">mnstrmr@gmail.com</a>><br>To: <<a href="mailto:zope@zope.org">zope@zope.org</a>><br>Sent: Sunday, November 05, 2006 10:28 PM
<br>Subject: [Zope] newbie -- creating a Product<br><br><br>> I'm a complete Zope novice. Forgive me if my question is inane.<br>><br>> I need to be able to send an e-mail (following a form submit) with an<br>> attachment
<br>> (and I prefer not to use DTML). I can send e-mails withOUT attachments,<br>> but<br>> according to this:<br>> <a href="http://mail.zope.org/pipermail/zope/2005-May/159291.html">http://mail.zope.org/pipermail/zope/2005-May/159291.html
</a><br>><br>> I need to create<br>><br>><br>> "a simple product like this:<br>><br>> EmailTools/__init__.py<br>> ------------------- contents ---------------------------------<br>> from AccessControl import allow_module, allow_class, allow_type
<br>> from AccessControl import ModuleSecurityInfo, ClassSecurityInfo<br>><br>> from email.MIMEText import MIMEText<br>> from email.MIMEMultipart import MIMEMultipart<br>> from email.MIMEBase import MIMEBase
<br>> from email.Header import Header<br>> from MailCrypt import signmail<br>> from email.Encoders import encode_base64<br>><br>> allow_class(BlockFormatter)<br>> allow_class(MIMEBase)<br>> allow_class(MIMEText)
<br>> allow_class(MIMEMultipart)<br>> allow_class(Header)<br>> allow_class(signmail)<br>> allow_class(encode_base64)<br>> ---------------------------------------------------------------<br>> "<br>>
<br>><br>><br>> This then will allow me to send attachments using<br>><br>> from Products.EmailTools import<br>> MIMEText,MIMEBase,MIMEMultipart,Header,encode_base64<br>><br>> in the python script. (Without the EmailTools product Zope tells me I am
<br>> not<br>> allowed to import MIME*)<br>><br>><br>> This is where my question comes in. I have tried to create the product<br>> both from<br>> the ZMI (which does not allow the creation of __init__.py's) and via
<br>> command<br>> line (in ~/Products, in lib/Python, everywhere that the sparse and<br>> conflicting<br>> information I have been able to gather tells me). Doing the latter I can<br>> certainly create the __init__.py but the Product doesn't register with
<br>> zope.<br>><br>><br>> Could someone give a quick walk-through (or point to an up-to-date source)<br>> on<br>> how to create this Product?<br>><br>> (I am running Zope 2.8.6-final, python 2.4.3
, linux2)<br><br>For a single task like you have described it may be easier to create a<br>simple external method.<br><br><br>Jonathan<br><br><br></blockquote></div><br>