]> nos-oignons.net Git - gestion-adh.git/blob - lib/nos_oignons/mailman.rb
501b5429ade1d685c193cda0f15df341b2abba11
[gestion-adh.git] / lib / nos_oignons / mailman.rb
1 #-*- coding: utf-8 -*-
2
3 require 'shellwords'
4
5 module NosOignons
6   module Mailman
7     class << self
8       def list_members(list)
9         `list_members #{Shellwords.escape(list)}`.split
10       end
11
12       def add_member(list, email)
13         add_members(list, [email])
14       end
15
16       def add_members(list, emails)
17         # XXX IO.popen 
18         `add_members #{Shellwords.escape(list)}`.split
19       end
20     end
21   end
22 end