Python scripts are run in a restricted environment,
move your code to either an external method or a python zope product built on the filesystem


Nicolas Georgakopoulos wrote:

Trying to execute the following code from a python script

from smtplib import SMTP
from email.MIMEText import MIMEText

I get a error:

*Error Type: ImportError*
*Error Value: import of "SMTP" from "smtplib" is unauthorized. You are not allowed to access 'SMTP' in this context
*
Why I can't access SMTP if I am a user manager with all the access enabled for managers in the current context ?
_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

.


_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   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