Skip to Content.
Sympa Menu

en - [sympa-users] Re: Re: XML Input File Format again

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: Olivier Salaün - CRU <address@concealed>
  • To: Redmond Militante <address@concealed>
  • Cc: address@concealed
  • Subject: [sympa-users] Re: Re: XML Input File Format again
  • Date: Wed, 10 Jan 2007 09:38:44 +0100

Hi Redmond,

Redmond Militante wrote:
I was able to set send and anonymous_sender, I'm still having trouble setting reply_to_header.other_email and include_list.  We are basically interested in creating lists programmatically via a .cgi script using the command

system("/home/sympa/bin/sympa.pl -create_list $list_name -input_file $list_name.xml"); 

This works fine, but we would like to configure the values for reply_to_header.other_email and include_list.  Is this possible?  Has anyone tried to create lists this way, and is this even the best approach?  For our purposes users need to be able to create lists via a simple web form instead of the sympa web interface.

$list_name.xml looks like
 
<?xml version="1.0" ?>
<list>
  <listname>$list_name</listname>
  <type>generic-list2</type>
  <visibility>secret</visibility>
  <include_list>other</include_list>
...
  <reply_to_header>
    <value>other_email</value>
    <other_email>test\@gmail.com</other_email>
    <apply>respect</apply>
  </reply_to_header>
...
</list>

-our generic-list2 familyi config.tt2 file looks like

indclude_list [% include_list %]
  
There seem to be a typo here with indclude_list.
reply_to_header
value other_email
[% IF other_email -%]
other_email [% other_email %]
[% END %]
apply respect
  
Given your XML file, the TT2 should rather refer to [% reply_to_header.other_email %] instead of  [% other_email %].
I'd also like to have multiple include_lists.  
All you have to do is
  1) create as many <include_list> entries in the XML file as needed
  2) set the 'multiple="1"' attribute for these entries (use owner entries as a example). This is required for Sympa to know that these entries should be stored in an array.
  3) in the TT2 file replace the "include_list [% include_list %]" piece with a FOEACH (again owner is a good example)




Archive powered by MHonArc 2.6.19+.

Top of Page