Dear All,

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 <dtml-if "email "> it stop giving the error but allow user sending without entering email address.


<dtml-if "email and '@' in email">

<dtml-sendmail smtphost="mail.domain.com">
To: <advert@domain.com>
From: <<dtml-var email>>
cc: <kamal@dv.net>
Subject: Advert Placement


Name: <dtml-var fullnames>

Company Name: <dtml-var company>

</dtml-sendmail>

<dtml-else>

  <P>Please complete all of the required fields.<br>
  The following fields are missing:</P>

<dtml-comment>
Display the emtpy fields.  Repeat the   <dtml-if "requiredfieldname ==''">....</dtml-if> for each field you want to display.
</dtml-comment>

<dtml-if "email == ''">
  E-mail address</p>
</dtml-if>
  
 
</dtml-if>



An error was encountered while publishing this resource.

TypeError
Sorry, a site error occurred.

Traceback (innermost last): TypeError: unsliceable object (Also, an error occurred while attempting to render the standard error message.