[Zope] Good way to send mail from Python Scripts?

Geir Bækholt Geir Bækholt
Sat, 15 Sep 2001 00:25:25 +0200


Hello Jean, 
Friday, September 14, 2001, 23:39:47, you wrote:
..
[snip]
...
JJ> 3. Now, unfortunately, the 'mailMessages' Python script won't have a
JJ>    'REQUEST' of its own. In order to get hold of a 'REQUEST', wrap the
JJ>    Python script in another DTML method, and see to it that 'REQUEST' is
JJ>    included in the list of parameters for 'mailMessages'.

JJ>    'mailMessagesWrapper'::

JJ>     <dtml-call mailMessages>

JJ> I'm pretty sure this will trigger lots of good advice on what I could be
JJ> doing better .. that would be most welcome.
JJ> Regards,
JJ> Jean

You can easily get at the current REQUEST object in Pythonscripts
using context.REQUEST

:-)

-- 
Geir Bækholt                   web-developer/zopatista
geirh@funcom.com             funcom oslo | webdev-team

            <!-- PGPid : 0x90B47B20 -->