summaryrefslogtreecommitdiff
path: root/Mailman/docs/reply-to.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Mailman/docs/reply-to.txt')
-rw-r--r--Mailman/docs/reply-to.txt44
1 files changed, 22 insertions, 22 deletions
diff --git a/Mailman/docs/reply-to.txt b/Mailman/docs/reply-to.txt
index 51fd5a143..537681f93 100644
--- a/Mailman/docs/reply-to.txt
+++ b/Mailman/docs/reply-to.txt
@@ -9,7 +9,7 @@ is getting sent through the system. We'll take things one-by-one.
>>> from Mailman.Handlers.CookHeaders import process
>>> from Mailman.configuration import config
- >>> mlist = config.db.list_manager.create('_xtest@example.com')
+ >>> mlist = config.db.list_manager.create(u'_xtest@example.com')
>>> mlist.subject_prefix = u''
Reply-to munging refers to the behavior where a mailing list can be configured
@@ -39,47 +39,47 @@ message, the list's posting address simply gets inserted.
>>> from Mailman.interfaces import ReplyToMunging
>>> mlist.reply_goes_to_list = ReplyToMunging.point_to_list
- >>> mlist.preferred_language = 'en'
- >>> mlist.description = ''
- >>> msg = message_from_string("""\
+ >>> mlist.preferred_language = u'en'
+ >>> mlist.description = u''
+ >>> msg = message_from_string(u"""\
... From: aperson@example.com
...
- ... """, Message)
+ ... """)
>>> process(mlist, msg, {})
>>> len(msg.get_all('reply-to'))
1
>>> msg['reply-to']
- '_xtest@example.com'
+ u'_xtest@example.com'
It's also possible to strip any existing Reply-To header first, before adding
the list's posting address.
>>> mlist.first_strip_reply_to = True
- >>> msg = message_from_string("""\
+ >>> msg = message_from_string(u"""\
... From: aperson@example.com
... Reply-To: bperson@example.com
...
- ... """, Message)
+ ... """)
>>> process(mlist, msg, {})
>>> len(msg.get_all('reply-to'))
1
>>> msg['reply-to']
- '_xtest@example.com'
+ u'_xtest@example.com'
If you don't first strip the header, then the list's posting address will just
get appended to whatever the original version was.
>>> mlist.first_strip_reply_to = False
- >>> msg = message_from_string("""\
+ >>> msg = message_from_string(u"""\
... From: aperson@example.com
... Reply-To: bperson@example.com
...
- ... """, Message)
+ ... """)
>>> process(mlist, msg, {})
>>> len(msg.get_all('reply-to'))
1
>>> msg['reply-to']
- 'bperson@example.com, _xtest@example.com'
+ u'bperson@example.com, _xtest@example.com'
Explicit Reply-To
@@ -88,41 +88,41 @@ Explicit Reply-To
The list can also be configured to have an explicit Reply-To header.
>>> mlist.reply_goes_to_list = ReplyToMunging.explicit_header
- >>> mlist.reply_to_address = 'my-list@example.com'
- >>> msg = message_from_string("""\
+ >>> mlist.reply_to_address = u'my-list@example.com'
+ >>> msg = message_from_string(u"""\
... From: aperson@example.com
...
- ... """, Message)
+ ... """)
>>> process(mlist, msg, {})
>>> len(msg.get_all('reply-to'))
1
>>> msg['reply-to']
- 'my-list@example.com'
+ u'my-list@example.com'
And as before, it's possible to either strip any existing Reply-To header...
>>> mlist.first_strip_reply_to = True
- >>> msg = message_from_string("""\
+ >>> msg = message_from_string(u"""\
... From: aperson@example.com
... Reply-To: bperson@example.com
...
- ... """, Message)
+ ... """)
>>> process(mlist, msg, {})
>>> len(msg.get_all('reply-to'))
1
>>> msg['reply-to']
- 'my-list@example.com'
+ u'my-list@example.com'
...or not.
>>> mlist.first_strip_reply_to = False
- >>> msg = message_from_string("""\
+ >>> msg = message_from_string(u"""\
... From: aperson@example.com
... Reply-To: bperson@example.com
...
- ... """, Message)
+ ... """)
>>> process(mlist, msg, {})
>>> len(msg.get_all('reply-to'))
1
>>> msg['reply-to']
- 'my-list@example.com, bperson@example.com'
+ u'my-list@example.com, bperson@example.com'