[Zope] SMTPSenderRefused error
Andreas Jung
andreas at andreas-jung.com
Fri Oct 17 10:27:17 EDT 2003
--On Freitag, 17. Oktober 2003 16:19 Uhr +0200 Ruth Mizzi <ruth at anvil.com>
wrote:
>
> import smtplib
> try:
> Anvil_Page.MailHost.send("This is a test", 'ruth at ffff.com')
> except smtplib.SMTPSenderRefused:
> get_transaction().abort()
> return "Invalid email address: please press your browser's='back' key
> and correct it" else:
> return 0
>
> The only problem is that when I try to test this script the zope login
> screen comes up and regardless what passwords and logins I try to enter,
> including the admin one, I end up with the error:
>
> "You are not allowed to access SMTPSenderRefused in this context"
>
You're not allowed to use the smptlib in a PythonScript. This is an FAQ
so check the mailinglist archives how to allow access to Python modules
that are not allowed to be imported by default.
-aj
More information about the Zope
mailing list