Re: [Zope] sendmail implementation problem
Hi Dieter, Thanks again for your help :) I'm having some trouble creating the new variable in REQUEST - maybe you know why? The REQUEST object holds: KEY ITEM lreilly lreilly (recipient - '@cs.strath.ac.uk' is appended) ltlyer ltyler (recipient - '@cs.strath.ac.uk' is appended) subject >subject< sender >sender< message >message< senderEmail >senderEmail< But when I add in the code to create 'recipients' in the REQUEST object and then try and view REQUEST's contents again I get an error: > Error Type: NameError > Error Value: recipients Here's the method: ø¤º°`°º¤øø¤º°`°º¤ø,, " value=""> : ø¤º°`°º¤øø¤º°`°º¤ø,, Can you see any obvious problems? Thanks very much for your time. - Best regards, Lee -- Lee Reilly mailto:[EMAIL PROTECTED] ø¤º°`°º¤øø¤º°`°º¤øø¤º°`°º¤øø¤º°`°º¤ø HAVE SKILLS; WILL TRAVEL. I'm currently looking for an internship in the USA in the field of web development. Ideally, I'm looking for a placement for 3 to 18 months. Can you help? More details, my resume, etc. @ http://homepages.strath.ac.uk/~aeu97172/ ___ Zope maillist - [EMAIL PROTECTED] 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 )
Re: [Zope] sendmail implementation problem
Lee writes: > ... several recipients from form to sendmail ... I just skipped your question. Not sure, that I got it right. DTML does not have true variables with assignments. However, you can use the REQUEST object as a variable container. If your problem is to collect all recipients from the form and feed them to "sendmail" you could do something like this: ... ... To: You can even let ZPublisher form the list for you: give all form variables that will contain a recipient the name "recipients:list:ignore_empty" Then, if at least one of these fields got a value, you REQUEST will have a variable "recipients" containing a list with all these fields. I would like to point you to Python's "in" operator. Instead of _['sequence-key'] == 'message') or or (_['sequence-key'] == 'sender') or (_['sequence-key'] == 'senderEmail') or (_['sequence-key'] == 'subject') you can write: _['sequence-key'] in ('message','sender','senderEmail','subject') Easier to write and to read. Dieter ___ Zope maillist - [EMAIL PROTECTED] 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 )