Sorry, your ideas don't work either. This time I get a NameError for mhost in the following code in SendMailtag.py. mhost is never being created. if self.mailhost: mhost=md[self.mailhost] elif self.smtphost: mhost=MailBase() mhost._init(localHost=gethostname(), smtpHost=self.smtphost, smtpPort=self.port) mhost.send(self.section(md.this, md), self.mailto, self.mailfrom, self.subject) -- Robin Dunn robin@AllDunn.com http://AllDunn.com/robin/ http://AllDunn.com/wxPython/ Check it out! Try http://AllDunn.com/laughworks/ for a good laugh. -----Original Message----- From: John Eikenberry <jae@kavi.com> To: Robin Dunn <robin@alldunn.com> Cc: zope <zope@zope.org> Date: Thursday, March 04, 1999 1:17 PM Subject: Re: [Zope] evaluating attribute values
On Thu, 4 Mar 1999, Robin Dunn wrote:
For example, Zope doesn't like this:
<!--#sendmail smtphost=<!--#var smtpHost--> -->
or this:
<!--#sendmail smtphost=smtpHost-->
(it tries to use smtpHost as the host name, instead of its value)
Try:
<!--#sendmail "smtphost=smtpHost"-->
or this:
<!--#sendmail "smtphost=_['smtpHost']"-->
---
John Eikenberry [jae@kavi.com - http://taos.kavi.com/~jae/] ______________________________________________________________ "A society that will trade a little liberty for a little order will deserve neither and lose both." --B. Franklin
On Thu, 4 Mar 1999, Robin Dunn wrote:
Sorry, your ideas don't work either.
This time I get a NameError for mhost in the following code in SendMailtag.py. mhost is never being created.
if self.mailhost: mhost=md[self.mailhost] elif self.smtphost: mhost=MailBase() mhost._init(localHost=gethostname(), smtpHost=self.smtphost, smtpPort=self.port)
mhost.send(self.section(md.this, md), self.mailto, self.mailfrom, self.subject)
I think we're trying to assign a string where a mailhost object is needed. I'm not sure how to get around this, without an external method. Though with an external method, it'd be pretty simple: (warning: untested) def get_mailhost(self,property_name): """ gets the mailhost """ mailhost_id = getattr(self,property_name) return getattr(self,mailhost_id) Or something like this... [shrug] --- John Eikenberry [jae@kavi.com - http://taos.kavi.com/~jae/] ______________________________________________________________ "A society that will trade a little liberty for a little order will deserve neither and lose both." --B. Franklin
participants (2)
-
John Eikenberry -
Robin Dunn