[Zope] SMTPSenderRefused error

Ruth Mizzi ruth at anvil.com
Fri Oct 17 10:19:45 EDT 2003


Hi,

I'm using a mailhost on my site in order to be able to send out emails.
When a user registers into the site I want to validate the email address given to confirm, as much as is possible with a not too detailed function, that the address given is valid.
Reading through forums I've concluded that all I need to do is to attempt to send a confirmation or test mail to the given address, if an SMTPSenderRefused error is received then I can assumed that there is something wrong with the mail addrees...

the python script I'm using is simply:

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"

Any idea what I've got wrong?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.zope.org/pipermail/zope/attachments/20031017/a4372b3c/attachment.html


More information about the Zope mailing list