Sorry that was a typo in the mail ... it actually is : container.aq_parent.mail_host.send(messageText=msg_body, mto=to, mfrom='aaaa@dom.com', subject=sub, encode='base64') AM Dieter Maurer wrote:
Aseem Mohanty writes:
I have a small python script called sendmail:
container.aq_parent.send(messageText=msg_body, mto=to, mfrom='aaaa@dom.com', subject=sub, encode='base64')
The problem is that when I try to call it from another PyScript, I get a "not allowed to call send in this context" error. If I cant do this then how can I send an email from within another PyScript?? The reference to "send" looks really strange!
Are you sure "container.aq_parent" has a "send" method? Or is this your mail host object?
Note, that special privileges are required to use mail hosts...
Dieter
.
-- ================================================================== Aseem Mohanty Neurobehavioral Systems Inc, 828 San Pablo Ave, Albany, CA 94706 (R) 510 7696011 (M) 510 3014871 (O) 510 5279231 ================================================================== "I saw `cout' being shifted "Hello world" times to the left and stopped right there!!" -- Steve Gonedes ==================================================================