Checking email in listname and adding an email to it.
This commit is contained in:
parent
fec10f2d69
commit
98ab786ded
1 changed files with 20 additions and 0 deletions
|
@ -36,6 +36,7 @@
|
||||||
find-mailman-list
|
find-mailman-list
|
||||||
mailman-list-name
|
mailman-list-name
|
||||||
mailman-list-members
|
mailman-list-members
|
||||||
|
mailman-sync-members
|
||||||
)
|
)
|
||||||
|
|
||||||
(import scheme
|
(import scheme
|
||||||
|
@ -43,6 +44,7 @@
|
||||||
(chicken pathname)
|
(chicken pathname)
|
||||||
(chicken string)
|
(chicken string)
|
||||||
(chicken sort)
|
(chicken sort)
|
||||||
|
(chicken format)
|
||||||
utils
|
utils
|
||||||
progress)
|
progress)
|
||||||
|
|
||||||
|
@ -113,8 +115,26 @@
|
||||||
(define (find-mailman-list lsts name)
|
(define (find-mailman-list lsts name)
|
||||||
(assoc name lsts))
|
(assoc name lsts))
|
||||||
|
|
||||||
|
;; Returns #t if the email is in given ml
|
||||||
|
(define (email-in-mailman-list? ml email)
|
||||||
|
(if (member email (mailman-list-members ml))
|
||||||
|
#t
|
||||||
|
#f))
|
||||||
|
|
||||||
|
;; Adds given email to given listname
|
||||||
|
(define (add-email-to-mailman-list listname email)
|
||||||
|
(let ((result
|
||||||
|
(get-mailman-output-lines
|
||||||
|
"add_members" "-r" "-" listname
|
||||||
|
(sprintf "<<<\"~A\"" email))))
|
||||||
|
(print result)))
|
||||||
|
|
||||||
|
(define (remove-email-from-mailman-list listname email)
|
||||||
|
#f)
|
||||||
|
|
||||||
;; Ensures given email is in given ML
|
;; Ensures given email is in given ML
|
||||||
(define (mailman-ensure-member ml email)
|
(define (mailman-ensure-member ml email)
|
||||||
|
|
||||||
#f)
|
#f)
|
||||||
|
|
||||||
;; Makes sure given member is removed
|
;; Makes sure given member is removed
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue