diff options
| author | Barry Warsaw | 2009-12-06 18:15:20 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2009-12-06 18:15:20 -0500 |
| commit | 6d84ef35f707646501f6fec254e153dbdf719cdb (patch) | |
| tree | c5a4cf43d316393a947d2487dd274a1b85ddc377 /src | |
| parent | 3923739f961b4bbbd857a67060879c9cf37700df (diff) | |
| download | mailman-6d84ef35f707646501f6fec254e153dbdf719cdb.tar.gz mailman-6d84ef35f707646501f6fec254e153dbdf719cdb.tar.zst mailman-6d84ef35f707646501f6fec254e153dbdf719cdb.zip | |
Diffstat (limited to 'src')
| -rw-r--r-- | src/mailman/queue/docs/command.txt | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/mailman/queue/docs/command.txt b/src/mailman/queue/docs/command.txt index fd0236a8c..19c01dcae 100644 --- a/src/mailman/queue/docs/command.txt +++ b/src/mailman/queue/docs/command.txt @@ -134,8 +134,17 @@ address, and the other is the results of his email command. >>> def sortkey(item): ... return item.msg['subject'] >>> messages = sorted(get_queue_messages('virgin'), key=sortkey) + + >>> from mailman.interfaces.domain import IDomainManager + >>> from mailman.interfaces.registrar import IRegistrar + >>> registrar = IRegistrar(IDomainManager(config)['example.com']) >>> for item in messages: - ... print 'Subject:', item.msg['subject'] + ... subject = item.msg['subject'] + ... print 'Subject:', subject + ... if 'confirm' in str(subject): + ... token = str(subject).split()[1].strip() + ... status = registrar.confirm(token) + ... assert status, 'Confirmation failed' Subject: confirm ... Subject: The results of your email commands @@ -168,7 +177,7 @@ Similarly, to leave a mailing list, the user need only email the -leave or Message-ID: ... <BLANKLINE> - Results: - dperson@example.com left test@example.com + Dirk Person <dperson@example.com> left test@example.com <BLANKLINE> - Done. <BLANKLINE> |
