[Zope] Zope and Sendmail,Squishdot Login Problems

Zope@Stylus zope@stylusinc.net
Mon, 5 May 2003 15:00:29 +0530


HI all

I am working on MandrakeLinux8.2,Zope2.5.1,
I am trying to use this example from ZOPELABS to send a mail .When I use
this ,IF I am logged into the ZMI i am able to send mails.But if I am trying
to access this same script from an application that I have built in Zope
then the following Error (UNAUTHORIZED) is thrown after asking for logging
into the ZMI.Bu then my applicatin is not actually logging in Users to Zope
since all the back end USers validation is done with the RDBMS i am
using(Postgres) tables.I am facing thi same Problem when I am using
SQUISHDOT  when i try to send a reply to a Forum message the application
asks me to Log in.But the user is already logged in with cvalidation done
frm Postgres.How should I go about resolving this issue?I want to add
folders and upload Files and Images ,Use Squishdot and use SendMail form my
application but I am not actually logged into Zope (I am logged into my
application).But since these users do not exist in acl_users in Zpoe it is
not allowing me to access any ofthese.Please guide me as to how I can go
about this problem and get all these done.

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

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

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

====================================================

Zope Error
Zope has encountered an error while publishing this resource.
Error Type: Unauthorized
Error Value: You are not allowed to access send in this context

Thanks in Advance for all Help.
Best regards
John


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.476 / Virus Database: 273 - Release Date: 4/24/2003