summaryrefslogtreecommitdiff
path: root/src/mailman/pipeline/docs/file-recips.txt
diff options
context:
space:
mode:
authorBarry Warsaw2010-09-09 17:23:29 -0400
committerBarry Warsaw2010-09-09 17:23:29 -0400
commitd3d0f81bf56775900df0d55c1ccfaec9fe25c33b (patch)
treefbe3e5f05a85202dce82ed092875841b3348291e /src/mailman/pipeline/docs/file-recips.txt
parent47df93b5e4a7447956b047ca4e8c9f4aa80a7429 (diff)
downloadmailman-d3d0f81bf56775900df0d55c1ccfaec9fe25c33b.tar.gz
mailman-d3d0f81bf56775900df0d55c1ccfaec9fe25c33b.tar.zst
mailman-d3d0f81bf56775900df0d55c1ccfaec9fe25c33b.zip
More doc fixes.
Diffstat (limited to 'src/mailman/pipeline/docs/file-recips.txt')
-rw-r--r--src/mailman/pipeline/docs/file-recips.txt11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/mailman/pipeline/docs/file-recips.txt b/src/mailman/pipeline/docs/file-recips.txt
index 3180df1fb..c7eeb9ce8 100644
--- a/src/mailman/pipeline/docs/file-recips.txt
+++ b/src/mailman/pipeline/docs/file-recips.txt
@@ -3,8 +3,8 @@ File recipients
===============
Mailman can calculate the recipients for a message from a Sendmail-style
-include file. This file must be called members.txt and it must live in the
-list's data directory.
+include file. This file must be called ``members.txt`` and it must live in
+the list's data directory.
>>> mlist = create_list('_xtest@example.com')
@@ -14,6 +14,7 @@ Short circuiting
If the message's metadata already has recipients, this handler immediately
returns.
+::
>>> msg = message_from_string("""\
... From: aperson@example.com
@@ -37,7 +38,7 @@ Missing file
============
The include file must live inside the list's data directory, under the name
-members.txt. If the file doesn't exist, the list of recipients will be
+``members.txt``. If the file doesn't exist, the list of recipients will be
empty.
>>> import os
@@ -58,6 +59,7 @@ Existing file
If the file exists, it contains a list of addresses, one per line. These
addresses are returned as the set of recipients.
+::
>>> fp = open(file_path, 'w')
>>> try:
@@ -77,8 +79,9 @@ addresses are returned as the set of recipients.
'eperson@example.com', 'fperson@example.com', 'gperson@example.com']
However, if the sender of the original message is a member of the list and
-their address is in the include file, the sender's address is /not/ included
+their address is in the include file, the sender's address is *not* included
in the recipients list.
+::
>>> from mailman.interfaces.usermanager import IUserManager
>>> from zope.component import getUtility