Hi, I have a property to a ZClass that defines the mailhost to be used for the instance. The property is called use_mailhost. Now I am working on a method that is to make use of this property, but I can't get it to work: <dtml-sendmail mailhost="_[use_mailhost]"> <dtml-sendmail mailhost="_.[use_mailhost]"> <dtml-sendmail mailhost="<dtml-var use_mailhost>"> <dtml-sendmail mailhost="<&dtml-use_mailhost;>"> all don't work. Now I am out of tries :-( I were favoring the first one why don't they all work??? where's the error? Jochen
This is what I use and it is called from a dtml document, I don't know if that will cause a difference rather than calling it from a ZClass. the Id is MailHost <!--#sendmail mailhost="MailHost"--> To: <dtml-var email null=""> Cc: <<dtml-var responder null="">@appstate.edu> From: ASU Ask A Librarian <<dtml-var responder null="">@conrad.appstate.edu> Subject:<dtml-var subject null=""> In reply to your question: <dtml-var question null=""> <dtml-var answer null=""> <!--#/sendmail--> Jochen Haeberle wrote:
Hi,
I have a property to a ZClass that defines the mailhost to be used for the instance. The property is called use_mailhost.
Now I am working on a method that is to make use of this property, but I can't get it to work:
<dtml-sendmail mailhost="_[use_mailhost]"> <dtml-sendmail mailhost="_.[use_mailhost]"> <dtml-sendmail mailhost="<dtml-var use_mailhost>"> <dtml-sendmail mailhost="<&dtml-use_mailhost;>">
all don't work. Now I am out of tries :-( I were favoring the first one why don't they all work??? where's the error?
Jochen
_______________________________________________ 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 )
-- -------------------------------------------------------------------- Rock and Rule Zope Rocks -- http://www.zope.org Python Rules -- http://www.python.org -------------------------------------------------------------------- Thomas McMillan Grant Bennett Appalachian State University Computer Consultant II University Library bennettt@am.appstate.edu http://www.library.appstate.edu/webmaster/ Voice: 828 262 6587 FAX: 828 262 3001 Windows 95 is a 32-bit extension to a 16-bit patch for an 8-bit operating system that was originally coded for a 4-bit microprocessor. - Chris Dunphy Boot Magazine
On Wed, 16 Feb 2000, Jochen Haeberle wrote:
I have a property to a ZClass that defines the mailhost to be used for the instance. The property is called use_mailhost.
Now I am working on a method that is to make use of this property, but I can't get it to work:
<dtml-sendmail mailhost="_[use_mailhost]">
I'm guessing that the problem here is that the 'mailhost' parameter is expecting a mailhost *object*, but that you are trying to reference a string property. To do that, you'd want to use the 'smtphost' parameter. --RDM
Hi! At 0:19 Uhr -0500 16.02.2000, R. David Murray wrote:
On Wed, 16 Feb 2000, Jochen Haeberle wrote:
I have a property to a ZClass that defines the mailhost to be used for the instance. The property is called use_mailhost.
Now I am working on a method that is to make use of this property, but I can't get it to work:
<dtml-sendmail mailhost="_[use_mailhost]">
I'm guessing that the problem here is that the 'mailhost' parameter is expecting a mailhost *object*, but that you are trying to reference a string property. To do that, you'd want to use the 'smtphost' parameter.
Yes, you are right, I guess that has to do with the problem, but I am not through, yet... About the same problem happens when I use smtphost (changing the value of my string property accordingly!): Error Type: error Error Value: host not found <!-- Traceback (innermost last): File /serve/MIS-Zope-2.1.3/lib/python/ZPublisher/Publish.py, line 214, in publish_module File /serve/MIS-Zope-2.1.3/lib/python/ZPublisher/Publish.py, line 179, in publish File /serve/MIS-Zope-2.1.3/lib/python/Zope/__init__.py, line 202, in zpublisher_exception_hook (Object: Cat3) File /serve/MIS-Zope-2.1.3/lib/python/ZPublisher/Publish.py, line 165, in publish File /serve/MIS-Zope-2.1.3/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: email_photo) File /serve/MIS-Zope-2.1.3/lib/python/ZPublisher/Publish.py, line 102, in call_object (Object: email_photo) File /serve/MIS-Zope-2.1.3/lib/python/OFS/DTMLMethod.py, line 145, in __call__ (Object: email_photo) File /serve/MIS-Zope-2.1.3/lib/python/DocumentTemplate/DT_String.py, line 502, in __call__ (Object: email_photo) File /serve/MIS-Zope-2.1.3/lib/python/Products/MailHost/SendMailTag.py, line 189, in render (Object: _.getvalue(PhotoAlbum_Mailhost)) File /serve/MIS-Zope-2.1.3/lib/python/Products/MailHost/MailHost.py, line 206, in send (Object: ) File /serve/MIS-Zope-2.1.3/lib/python/Products/MailHost/MailHost.py, line 253, in __init__ error: (see above) --> Even if it worked, it would not be what I want. I would like to have a string property to my ZClass that refers to an Mailhost object. I know this is not that easy, but as far as I know, the object that is referred to by the string object should be callable as _.getitem('my_mailhost') but it does not work... my_mailhost contains a vaild smtp hostname. Could someone please give me a clue??? Jochen
participants (3)
-
Jochen Haeberle -
R. David Murray -
TMGB