<html>
<body>
<font size=5><br>
</font>Dear All,<br><br>
I do not know what I am doing wrong here. when I executed the below codes
it gives the error below for both true and false conditions, but when i
change the line 1 to <b>&lt;dtml-if &quot;email &quot;&gt;</b> it stop
giving the error but allow user sending without entering email address.
<br><br>
<br>
<b>&lt;dtml-if &quot;email and '@' in email&quot;&gt;<br><br>
</b>&lt;dtml-sendmail smtphost=&quot;mail.domain.com&quot;&gt;<br>
To: &lt;advert@domain.com&gt;<br>
From: &lt;&lt;dtml-var email&gt;&gt;<br>
cc: &lt;kamal@dv.net&gt;<br>
Subject: Advert Placement <br><br>
<br>
Name: &lt;dtml-var fullnames&gt;<br><br>
Company Name: &lt;dtml-var company&gt;<br><br>
&lt;/dtml-sendmail&gt;<br><br>
&lt;dtml-else&gt;<br><br>
&nbsp; &lt;P&gt;Please complete all of the required
fields.&lt;br&gt;<br>
&nbsp; The following fields are missing:&lt;/P&gt;<br><br>
&lt;dtml-comment&gt;<br>
Display the emtpy fields.&nbsp; Repeat the&nbsp;&nbsp; &lt;dtml-if
&quot;requiredfieldname ==''&quot;&gt;....&lt;/dtml-if&gt; for each field
you want to display.<br>
&lt;/dtml-comment&gt;<br><br>
&lt;dtml-if &quot;email == ''&quot;&gt;<br>
&nbsp; E-mail address&lt;/p&gt;<br>
&lt;/dtml-if&gt;<br>
&nbsp;&nbsp; <br>
&nbsp; <br>
&lt;/dtml-if&gt;<br><br>
<br><br>
An error was encountered while publishing this resource. <br><br>
<b>TypeError<br>
</b>Sorry, a site error occurred. <br><br>
Traceback (innermost last): 
<ul>
<li>Module ZPublisher.Publish, line 150, in publish_module 
<li>Module ZPublisher.Publish, line 114, in publish 
<li>Module Zope.App.startup, line 182, in zpublisher_exception_hook 
<li>Module ZPublisher.Publish, line 98, in publish 
<li>Module ZPublisher.mapply, line 88, in mapply 
<li>Module ZPublisher.Publish, line 39, in call_object 
<li>Module OFS.DTMLMethod, line 126, in __call__ 
<li>Module DocumentTemplate.DT_String, line 474, in __call__ 
<li>Module OFS.DTMLMethod, line 119, in __call__ 
<li>Module DocumentTemplate.DT_String, line 474, in __call__ 
<li>Module OFS.DTMLMethod, line 119, in __call__ 
<li>Module DocumentTemplate.DT_String, line 474, in __call__ 
<li>Module DocumentTemplate.DT_Util, line 201, in eval
<li>__traceback_info__: email 
<li>Module &lt;string&gt;, line 2, in f 
<li>Module OFS.ObjectManager, line 645, in __getitem__ 
<li>Module OFS.ObjectManager, line 237, in _getOb 
</ul>TypeError: unsliceable object (Also, an error occurred while
attempting to render the standard error message. <br>
</body>
</html>