[Zope] a little problem - $1 reward!

2001-01-25 Thread Lee

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

h2Cheers, dtml-var sender!/h2
  pYour 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 +
From: Lee
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED], [EMAIL PROTECTED]

-=-==--=-= but I see:

Subject:  Hello
Date: Thu, 25 Jan 2001 08:30:11 +
From: [EMAIL PROTECTED]  why is the @cs.strath.ac.uk still
appended?
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED], [EMAIL PROTECTED]

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='[EMAIL PROTECTED]'. 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:[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/

/shameless plug


___
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] a little problem - $1 reward!

2001-01-25 Thread M.

Lee,
This is more than likely your mailer doing this, not Zope.
try:
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

Notice the quotes around the dtml-var sender

On 25 Jan 2001 08:52:07 +, Lee wrote:
 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".


___
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] a little problem - $1 reward!

2001-01-25 Thread Lee

Hi,

Thanks for your response. "dtml-var sender" gives me...

From: "Lee"@cs.strath.ac.uk

... in the received message. A previous version I had of this script gave
me the correct results (From: God, Reply-To: [EMAIL PROTECTED]) so I'm
pretty-sure that's it's a problem with '@cs.strath.ac.uk' being appended.

As far as I can tell, the new version is doing exactly the same thing only
using a collection of recipients and python's string_join. H...

The virtual buck is still here!

Thanks,

Lee

"M. Adam Kendall" wrote:

 Lee,
 This is more than likely your mailer doing this, not Zope.
 try:
   From: "dtml-var sender"

 Notice the quotes around the dtml-var sender

--
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/

/shameless plug



___
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] a little problem - $1 reward!

2001-01-25 Thread Erik Enge

[[EMAIL PROTECTED]]

| ... in the received message. A previous version I had of this script gave
| me the correct results (From: God, Reply-To: [EMAIL PROTECTED]) so I'm
| pretty-sure that's it's a problem with '@cs.strath.ac.uk' being appended.

And you are running with the same mailserver, on the same host?

___
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] a little problem - $1 reward!

2001-01-25 Thread Lee

 DON'T HAVE ANY WHITESPACE BEFORE THE MAIL HEADERS. (sorry for the shouting,
 but it's a classic misstake)

I didn't realise that. Thanks.

 Does it work "DTMLless". I.e. does it work with statically typed in email
 addresses and such?

Nope, 'From:Lee' still gives me [EMAIL PROTECTED] in the received message.

 And you are running with the same mailserver, on the same host?

Yup. Here's a little example of a mail program (some might call it an email
spammer perhaps) to help me apply for some jobs. This is also why I wanted to
know if sendmail could be used for usenet postings...

dtml-var standard_html_header

dtml-sendmail mailhost="MailHost"
To: dtml-var email
From: Lee Reilly
Reply-To: [EMAIL PROTECTED]
X-Mailer: Job Spammer
Subject: dtml-var position practical training/internship position
Content-Type: multipart/mixed; boundary="138879291FA1FC8B06755CEE"

This is a multi-part message in MIME format.
--138879291FA1FC8B06755CEE
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

--138879291FA1FC8B06755CEE
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Base: "http://homepages.strath.ac.uk/~aeu9717
2/"
Content-Location: "http://homepages.strath.ac.uk/~aeu9717
2/"

html
head
titleLee Reilly/title
meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"

meta name="description" content="seeking employment in the US for a period of 3
months starting in June 2001"

   meta name="keywords" content="lee, reilly, internship, web site, website,
BUNAC, summer, work, employment, Scottish, Lee Reilly"

/head

body bgcolor="#FF" text="#CCFFCC" link="#CC" vlink="#CC"
alink="#CC"
pfont color="#00" size="2" face="Arial, Helvetica, sans-serif"Dear
dtml-var name, /font/p
pfont color="#00" size="2" face="Arial, Helvetica, sans-serif"Further
  to you advertisement on dtml-var advertisement I am writing to enquire as to
whether you have any summer
  internship / practical training opportunities available for Computer Science
  graduates this summer. I am due to graduate with a BSc Hons degree in Computer

  Science in June 2001 from the University of Strathclyde, Glasgow, and from
there ... blah blah blah

/body
/html

--138879291FA1FC8B06755CEE--

/dtml-sendmail
h2Cheers big yin!/h2
pYou'll get the job ;-)/p
dtml-var standard_html_footer

This gives me the *correct* results so I can't imagine that's a problem with the
mailserver:

Subject: web developer practical training/internship position
Date: Thu, 25 Jan 2001 14:08:55 +
From:  Lee Reilly  - perfect!
Reply-To: [EMAIL PROTECTED]
To:  [EMAIL PROTECTED]

So I think it's a problem with
To: dtml-var "_.string.join(recipients,'@cs.strath.ac.uk,')"@cs.strath.ac.uk

It's now more trouble than it's worth so I'll just implement it differently.
It's quite annoying though!

Thanks for your help anyway :)

- Best regards,

Lee



___
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 )