[ZWeb] help please

Serdioukov Edouard sev@belsoft.by
Tue, 1 Oct 2002 18:07:52 +0300


This is a multi-part message in MIME format.

------_=_NextPart_001_01C2695C.504EACDA
Content-Type: text/plain;
	charset="koi8-r"
Content-Transfer-Encoding: quoted-printable

Hello
=20
Can you help me.=20
I got this error=20
Error Type: SMTPRecipientsRefused
Error Value: {'runyaga@abc.com': (550, '5.7.1 Unable to relay for =
runyaga@abc.com')}


when run this Python script in Zope:

try:
     mailhost=3Dgetattr(context, context.superValues('Mail Host')[0].id)
except:
     raise AttributeError, "cant find a Mail Host object"

mMsg =3D 'a testful email message \n that contains a few line breaks. \n =
~runyaga'
mTo =3D 'runyaga@abc.com'
mFrom =3D 'runyaga@xyz.com'
mSubj =3D 'mail subject'

mailhost.send(mMsg, mTo, mFrom, mSubj)


Thanks

Eduard


------_=_NextPart_001_01C2695C.504EACDA
Content-Type: text/html;
	charset="koi8-r"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dkoi8-r">


<META content=3D"MSHTML 6.00.2501.1" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D396550415-01102002>Hello</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D396550415-01102002></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D396550415-01102002>Can =
you help me.=20
</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN =
class=3D396550415-01102002>I&nbsp;got this=20
error </SPAN></FONT></DIV>
<DIV><FONT><SPAN class=3D396550415-01102002>
<P><FONT face=3DArial><FONT size=3D2><STRONG>Error Type:=20
SMTPRecipientsRefused</STRONG><BR><STRONG>Error Value: =
{'runyaga@abc.com': (550,=20
'5.7.1 Unable to relay for <A=20
href=3D"mailto:runyaga@abc.com'">runyaga@abc.com'</A>)}</STRONG><BR></FON=
T></FONT></P>
<P><SPAN class=3D396550415-01102002><FONT face=3DArial size=3D2>when run =
this Python=20
script in Zope:</FONT></SPAN></P>
<P><SPAN class=3D396550415-01102002><FONT face=3DArial=20
size=3D2>try:<BR>&nbsp;&nbsp;&nbsp;&nbsp; mailhost=3Dgetattr(context,=20
context.superValues('Mail Host')[0].id)<BR>except:<BR>&nbsp; =
&nbsp;&nbsp; raise=20
AttributeError, "cant find a Mail Host object"</FONT></SPAN></P>
<P><SPAN class=3D396550415-01102002><FONT face=3DArial size=3D2>mMsg =3D =
'a testful=20
email message \n that contains a few line breaks. \n ~runyaga'<BR>mTo =
=3D <A=20
href=3D"mailto:'runyaga@abc.com'">'runyaga@abc.com'</A><BR>mFrom =3D <A=20
href=3D"mailto:'runyaga@xyz.com'">'runyaga@xyz.com'</A><BR>mSubj =3D =
'mail=20
subject'</FONT></SPAN></P>
<P><SPAN class=3D396550415-01102002><FONT face=3DArial =
size=3D2>mailhost.send(mMsg,=20
mTo, mFrom, mSubj)<BR></FONT></SPAN></P>
<P><SPAN class=3D396550415-01102002><FONT face=3DArial=20
size=3D2>Thanks</FONT></SPAN></P>
<P><SPAN class=3D396550415-01102002><FONT face=3DArial=20
size=3D2>Eduard</P></FONT></SPAN></SPAN></FONT></DIV></BODY></HTML>

------_=_NextPart_001_01C2695C.504EACDA--