<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1226" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I'm using a mailhost on my site in order to be able 
to send out emails.</FONT></DIV>
<DIV><FONT face=Arial size=2>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.</FONT></DIV>
<DIV><FONT face=Arial size=2>Reading through forums I've concluded that all I 
need to&nbsp;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...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>the python script I'm using is simply:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>import smtplib<BR>try:<BR>&nbsp;&nbsp;&nbsp; 
Anvil_Page.MailHost.send("This is a test", <A 
href="mailto:'ruth@ffff.com'">'ruth@ffff.com'</A>)<BR>except 
smtplib.SMTPSenderRefused:<BR>&nbsp;&nbsp;&nbsp; 
get_transaction().abort()<BR>&nbsp;&nbsp;&nbsp; return "Invalid email address: 
please press your browser's='back' key and correct 
it"<BR>else:<BR>&nbsp;&nbsp;&nbsp; return 0</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>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:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>"You are not allowed to access SMTPSenderRefused in 
this context"</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Any idea what I've got 
wrong?</DIV></FONT></BODY></HTML>