[Zope] Mail Host problem

Dan Jacobs dan@caliginous.com
Thu, 2 Aug 2001 01:33:42 +0100 (BST)


try checking the security settings of mailhost, I had this problem and I
unchecked aquire permissions and set them manually (for 'use mailhost
services').

dj


On Wed, 1 Aug 2001 complaw@hal-pc.org wrote:

> I picked up the following code from runyaga via the ZopeLabs site:
> 
> try:
>   mailhost=getattr(context, context.SuperValues('Mail Host')[0].id)
> except:
>   raise AttributeError, "Cannot find a Mail Host object."
> 
> mMsg = 'A test e-mail message \n that contains a few line breaks. \n ~rlc'
> mTo  = 'docket.clerk@bakerbotts.com'
> mFrom = 'docket.clerk@bakerbotts.com'
> mSubj = 'Mail Host Test'
> 
> mailhost.send(mMsg, mTo, mFrom, mSubj)
> 
> --------------
> 
> I put a Mail Host object in the same folder as the above python script.  Tried
> it and got the exception.  runyaga said to have the Mail Host object below the
> script, so I put it in a folder object lower in the hierarchy.  Still got the
> exception.  Then I put the Mail Host object in the root folder.  Still got the
> exception.
> 
> Clearly I am not the Hostess with the mostest.  Does anyone know where I should
> place my Mail Host so that I don't throw the exception?
> 
> Incidentally, I have the option to hardwire the mail host directly into the code
> (its not going anywhere).  the id for the Mail Host in question is mailhost.
> 
> TIA,
> 
> Ron
> 
> 
> 
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>