[Zope] a little problem - $1 reward!

peter bengtson peter@grenna.net
Thu, 25 Jan 2001 10:40:44 -0000


Lee,

Before you move on to your DTML stuff about email address and stuff, you
should always make sure that you DON'T HAVE ANY WHITESPACE BEFORE THE MAIL
HEADERS. (sorry for the shouting, but it's a classic misstake)

Does it work "DTMLless". I.e. does it work with statically typed in email
addresses and such?
When your sendmail things works, try to work with the DTML stuff in a method
until that works. _Then_ merge the DTML and the sendmail.

Good luck!


----- Original Message -----
From: "Lee" <lee.reilly@ntlworld.com>
To: <zope@zope.org>
Sent: Thursday, January 25, 2001 8:52 AM
Subject: [Zope] a little problem - $1 reward!


> Hi there,
>
> If someone could have a quick look at this I would really appreciate it!
> I cannot for the life of me understand this... I have a DTML method
> taking in parameters for use with sendmail, which when I *display*
> appear correct but when I *send* are altered slightly. I know where the
> problem lies (it's obvious) but I can't see what the problem is.
>
> Here's my DTML method:
>
> <dtml-var standard_html_header>
> <dtml-call "REQUEST.set('recipients',[])">
>   <dtml-in "REQUEST.form.items()">
>     <dtml-if expr="_['sequence-key'] in
> ('message','sender','senderEmail','subject')">
>       <input type="hidden" name="<dtml-var sequence-key>"
> value="<dtml-var sequence-item>">
>     <dtml-else>
>       <dtml-call "recipients.append(_['sequence-key'])">
>     </dtml-if>
>   </dtml-in>
>
> <dtml-sendmail mailhost="MailHost">
>   To: <dtml-var "_.string.join(recipients,'@cs.strath.ac.uk,
> ')">@cs.strath.ac.uk
>   From: <dtml-var sender>
>   Reply-To: <dtml-var senderEmail>
>   Subject: <dtml-var subject>
>   X-Mailer: ZAPHOD Mail Client V1.0
>
>   <dtml-var message>
>
> </dtml-sendmail>
>
> <h2>Cheers, <dtml-var sender>!</h2>
>   <p>Your message has been sent.</p>
>
> ^
> My problem lies with the To/From parts in the <sendmail>. When the
> message has been sent...
>
> -=-==--=-= I should see:
>
> Subject:  Hello
> Date: Thu, 25 Jan 2001 08:30:11 +0000
> From: Lee
> Reply-To: lee.reilly@ntlworld.com
> To: ltyler@cs.strath.ac.uk, lreilly@cs.strath.ac.uk
>
> -=-==--=-= but I see:
>
> Subject:  Hello
> Date: Thu, 25 Jan 2001 08:30:11 +0000
> From: Lee@cs.strath.ac.uk <---- why is the @cs.strath.ac.uk still
> appended?
> Reply-To: lee.reilly@ntlworld.com
> To: ltyler@cs.strath.ac.uk, lreilly@cs.strath.ac.uk
>
> <dtml-var sender> gives me 'Lee'
>
> Clearly, there is a problem with :
> To: <dtml-var "_.string.join(recipients,'@cs.strath.ac.uk,
> ')">@cs.strath.ac.uk
> From: <dtml-var sender>
>
> i.e the @cs.strath.ac.uk is still lingering... but why? without the
> '@cs.strath.ac.uk' at the end of the var the last email address would
> not be complete i.e. it be "lreilly".
>
> even when i put another tag in place of from, e.g. 'X-Mailer:' is still
> renders From='Lee@cs.strath.ac.uk'. I know it's asking a lot but can
> anyone tell me what the problem is? I'm confused and the coffee isn't
> helping anymore!
>
> - Thanks,
>
> Lee
>
> --
> Lee Reilly
> mailto:lee.reilly@ntlworld.com
>
> ø¤º°`°º¤ø,,,,ø¤º°`°º¤ø,,,,ø¤º°`°º¤ø,,,,ø¤º°`°º¤ø,,,,
>
> 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/
>
> </shameless plug>
>
>
> _______________________________________________
> 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 )
>