summaryrefslogtreecommitdiff
path: root/mailman/docs/message.txt
diff options
context:
space:
mode:
authorBarry Warsaw2009-01-25 13:01:41 -0500
committerBarry Warsaw2009-01-25 13:01:41 -0500
commiteefd06f1b88b8ecbb23a9013cd223b72ca85c20d (patch)
tree72c947fe16fce0e07e996ee74020b26585d7e846 /mailman/docs/message.txt
parent07871212f74498abd56bef3919bf3e029eb8b930 (diff)
downloadmailman-eefd06f1b88b8ecbb23a9013cd223b72ca85c20d.tar.gz
mailman-eefd06f1b88b8ecbb23a9013cd223b72ca85c20d.tar.zst
mailman-eefd06f1b88b8ecbb23a9013cd223b72ca85c20d.zip
Diffstat (limited to 'mailman/docs/message.txt')
-rw-r--r--mailman/docs/message.txt48
1 files changed, 0 insertions, 48 deletions
diff --git a/mailman/docs/message.txt b/mailman/docs/message.txt
deleted file mode 100644
index dab9ddf0e..000000000
--- a/mailman/docs/message.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-Messages
-========
-
-Mailman has its own Message classes, derived from the standard
-email.message.Message class, but providing additional useful methods.
-
-
-User notifications
-------------------
-
-When Mailman needs to send a message to a user, it creates a UserNotification
-instance, and then calls the .send() method on this object. This method
-requires a mailing list instance.
-
- >>> mlist = config.db.list_manager.create(u'_xtest@example.com')
- >>> mlist.preferred_language = u'en'
-
-The UserNotification constructor takes the recipient address, the sender
-address, an optional subject, optional body text, and optional language.
-
- >>> from mailman.Message import UserNotification
- >>> msg = UserNotification(
- ... 'aperson@example.com',
- ... '_xtest@example.com',
- ... 'Something you need to know',
- ... 'I needed to tell you this.')
- >>> msg.send(mlist)
-
-The message will end up in the virgin queue.
-
- >>> switchboard = config.switchboards['virgin']
- >>> len(switchboard.files)
- 1
- >>> filebase = switchboard.files[0]
- >>> qmsg, qmsgdata = switchboard.dequeue(filebase)
- >>> switchboard.finish(filebase)
- >>> print qmsg.as_string()
- MIME-Version: 1.0
- Content-Type: text/plain; charset="us-ascii"
- Content-Transfer-Encoding: 7bit
- Subject: Something you need to know
- From: _xtest@example.com
- To: aperson@example.com
- Message-ID: ...
- Date: ...
- Precedence: bulk
- <BLANKLINE>
- I needed to tell you this.