[Zope] sendmail tag strangeness

Maik Roeder roeder@berg.net
Mon, 02 Oct 2000 00:02:01 +0200


Hi Scott !

Scott Burton wrote:
> The problem is, I have to put in the recipient by hand. This method is 
> supposed to email a recipient after filling out a form so the recipient
> has to be a variable. When I try using <dtml-var recipient> or &dtml-recipient;
> or _[recipient] I still have errors or the SMTP log shows that the variable
> does not get evaluated and shows up as a string of <&dtml-recipient;> 
> as being the recipient in the SMTP header.
> 
> Is this a bug? Is there something else I could try?

I have tested the following code on the ZDP site, and it works:

<dtml-call "REQUEST.set('mail_to','roeder@berg.net')">
<dtml-sendmail mailhost="MailHost">
To: <<dtml-var mail_to>>
From: The CommentClass constructor <zdp@zope.org>
Subject: A new Comment has been added to ZDP !

Dear Tom !

Under the following URL, a Comment has been added:

URL: <dtml-var URL4>/<dtml-var id>

Name:     <dtml-var name>

Nickname: <dtml-var nickname>

Content:
<dtml-var the_content>

Have a nice day,

The CommentClass constructor
(http://zdp.zope.org/Control_Panel/Products/DocumentFolderProduct/CommentClass_add/manage_main)


</dtml-sendmail>

Zope version: Zope 2.1.3 (source release, python 1.5.2, linux2) 
Python version: 1.5.2 (#1, Sep 17 1999, 20:15:36) [GCC egcs-2.91.66 19990314/Linux (egcs- 
System Platform: linux-i386 
Process ID: 1478 (1024) 
Running for: 34 days 4 hours 6 min 32 sec 

Maybe you can test the above code and see if it works. It may be possible to track 
down the bug by comparing the code from 2.1.3 with the code from your Zope version.

Regards,

Maik Röder

-- 
Uzopia - Digging la vida Zopa - http://uzopia.editthispage.com