Skip to content
Snippets Groups Projects

Add list style selection.

Closed J08nY requested to merge J08nY/mailmanclient:list-style-binding into master
Files
5
@@ -95,6 +95,22 @@ Once you have a domain, you can create mailing lists in that domain.
>>> print(test_one.display_name)
Test-1
You can create a mailing list with a specific list style.
>>> example.create_list('test-announce', style_name='legacy-announce')
<List "test-announce@example.com">
You can retrieve a list of known mailing list styles along with the default
one.
>>> styles = client.styles
>>> for style in styles['style_names']:
... print(style)
legacy-announce
legacy-default
>>> print(styles['default'])
legacy-default
You can also retrieve the mailing list after the fact.
>>> my_list = client.get_list('test-1@example.com')
@@ -118,6 +134,7 @@ And you can print all the known mailing lists.
<List "test-2@example.com">
<List "test-3@example.com">
<List "test-3@example.net">
<List "test-announce@example.com">
You can also select advertised lists only.
::
@@ -129,6 +146,7 @@ You can also select advertised lists only.
<List "test-2@example.com">
<List "test-3@example.com">
<List "test-3@example.net">
<List "test-announce@example.com">
List results can be retrieved as pages:
@@ -138,7 +156,7 @@ List results can be retrieved as pages:
>>> len(page)
2
>>> page.total_size
4
5
>>> for m_list in page:
... print(m_list)
<List "test-1@example.com">
@@ -167,6 +185,7 @@ object.
<List "test-1@example.com">
<List "test-2@example.com">
<List "test-3@example.com">
<List "test-announce@example.com">
It is also possible to display only advertised lists when using the domain.
@@ -174,6 +193,7 @@ It is also possible to display only advertised lists when using the domain.
... print(mlist)
<List "test-2@example.com">
<List "test-3@example.com">
<List "test-announce@example.com">
>>> for mlist in example.get_list_page(count=2, page=1, advertised=True):
... print(mlist)
<List "test-2@example.com">
@@ -192,7 +212,7 @@ You can also delete a list using the client instance's delete_list method.
... print(mlist)
<List "test-1@example.com">
<List "test-2@example.com">
<List "test-announce@example.com">
Membership
==========
@@ -695,6 +715,7 @@ The available pipelines and chains can also be retrieved:
default-owner-chain
default-posting-chain
discard
dmarc
header-match
hold
moderation
Loading