Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon6.gif   Conditional E-Mail Attributes, posted by Grant Jeffcote on Fri Aug 11 21:48:01 2006 
    icon2.gif   Re: Conditional E-Mail Attributes, posted by Stefan Ritt on Tue Aug 15 13:44:45 2006 
       icon2.gif   Re: Conditional E-Mail Attributes, posted by Grant Jeffcote on Fri Aug 18 14:22:07 2006 
          icon2.gif   Re: Conditional E-Mail Attributes, posted by Stefan Ritt on Fri Aug 18 15:31:53 2006 
             icon2.gif   Re: Conditional E-Mail Attributes, posted by Grant Jeffcote on Sat Aug 19 15:47:52 2006 
                icon2.gif   Re: Conditional E-Mail Attributes, posted by Stefan Ritt on Sat Aug 19 18:45:22 2006 
                   icon2.gif   Re: Conditional E-Mail Attributes, posted by Grant Jeffcote on Sat Aug 19 20:12:42 2006 
                      icon2.gif   Re: Conditional E-Mail Attributes, posted by Stefan Ritt on Tue Oct 10 08:52:50 2006 
Message ID: 1905     Entry time: Sat Aug 19 15:47:52 2006     In reply to: 1904     Reply to this: 1906
Icon: Reply  Author: Grant Jeffcote  Author Email: grant@jeffcote.org 
Category: Question  OS: Windows  ELOG Version:  
Subject: Re: Conditional E-Mail Attributes 

Stefan Ritt wrote:
If I try that little configuration file:
[global]
port = 8080
password file = passwd
smtp host = your.smpt.host

[demo]
Theme = default
Comment = General linux tips & tricks
Attributes = Author, Type, Category, Subject, Email Type
Options Type = Routine, Software Installation, Problem Fixed, Configuration, Other
Options Category = General, Hardware, Software, Network, Other
Options Email Type = plain{1}, html{2}

{1}Email encoding = 1
{2}Email encoding = 2

then the email encoding changes from plain to HTML depending on the conditional attribute Email Type. Maybe you misunderstood the concept of conditional attributes. In the above config the attribute Email Type determines the condition {1} or {2}, which leads then to different values of the email encoding. But it's important to have the line
Options Email Type = plain{1}, html{2}

in order to set a condition.


I use conditional attributes to select the fields I would like displayed on a form or page.
I understand how they work but wish to set the Email Encoding automatically depending on which item they choose from a drop down list (ie. which form they are using)

For example, if they choose 'Fred Bloggs' from the conditional drop down attribute 'Name' it will set the page so that only 'Fred Bloggs' required attributes are viewable. I wish to send this page in Plain text when submitted.

If 'Fred Jones' is chosen then only attributes applicable to 'Fred Jones' are shown. When he submits his entry then I need the email to be sent in HTML.

The email encoding option would have to be set under either Fred Bloggs{1} or Fred Jones{2} conditions.

Attributes = Name,

Options Name = Fred Bloggs{1}, Fred Jones{2}

{1}Email encoding = 1
{1}Email All = sed@frd.fg
{2}Email encoding = 2
{2}Email All = sdf@fgd.hg

I can get options like 'Email All = sed@frd.fg' to change to another email address when used as above but not Email formatting.

I have all the other conditional attributes working fine otherwise but would really like to be able to add this option.

Thanks for your help.
ELOG V3.1.5-fe60aaf