[Zope] error trying to import smtplib (unauthorized)

Nicolas Georgakopoulos nicolasg at vtrip.net
Thu Oct 13 10:33:53 EDT 2005


Chris Withers wrote:

> 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 ?
>
>
> *continues banging head against brick wall*
> Because it has no security declarations. If you bothered to install 
> VerboseSecurity it would have told you this...
>
> MailHosts are how you send mail in Zope...
>
> MailTemplates are what you want to use, I still don't understand why 
> you're having so many problems, I simply cannot reproduce what you're 
> seeing...
>
> Start with a fresh, clean Zope instance and tell me the steps you go 
> (every single one of them!) through to get to the point where you can 
> try the python script and get the errors you were complaining about 
> before...
>
> cheers,
>
> Chris
>
I have describe you on the previous mails all my steps and the error's I 
get....
I will try VerboseSecurity for a last chance ... if it doesn't work I 
will install the lates Zope release.


More information about the Zope mailing list