[Zope] help with MailTemplates 1.0.0

Nicolas Georgakopoulos nicolasg at vtrip.net
Tue Oct 11 09:53:40 EDT 2005


I installed the MailTemplates product to Zope and try to run the example 
from the readme file:
--------------------------------------------------
 Simple Example
      This example sends a simple templated mail to a specific
      address.
      Add the following to a Mail Template called my_mt:

      <tal:body xmlns:tal="http://xml.zope.org/namespaces/tal"
          xmlns:metal="http://xml.zope.org/namespaces/metal"
      >Dear <tal:x replace="options/mto"/>,
 
      <tal:x replace="user/getId"/> would like to thank you for
      your interest in:
      <a href=""
         tal:define="url root/absolute_url"
         tal:attributes="href url"
         tal:content="url"/>
 
      <tal:x replace="option/message"/>
       cheers,
      The Web Team
      </tal:body>

      Now add a Script (Python) in the same folder containing the
      following:

      container.my_mt(
          mfrom='webmaster at example.com',
          mto='user at example.com',
          message='This is a test!'
      )

      return 'Mail Sent!'
------------------------------------------------------

      I cant make it work, when I try to test the python script I get a 
page like this :

 <h2>Site Error</h2>

  <p>An error was encountered while publishing this resource.
  </p>
  
  <p>
      <strong>Error Type: KeyError</strong><br/>
      <strong>Error Value: u'option'</strong><br/> 
  </p>

can anyone give me a clue ?






More information about the Zope mailing list