summaryrefslogtreecommitdiff
path: root/mailman/commands/docs/echo.txt
blob: d2781d330cddd69e4f63b4dd9be27c00b9180dc1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
The 'echo' command
==================

The mail command 'echo' simply replies with the original command and arguments
to the sender.

    >>> from mailman.configuration import config
    >>> command = config.commands['echo']
    >>> command.name
    'echo'
    >>> command.argument_description
    '[args]'
    >>> command.description
    u'Echo an acknowledgement.  Arguments are return unchanged.'

The original message is ignored, but the results receive the echoed command.

    >>> from mailman.app.lifecycle import create_list
    >>> mlist = create_list(u'test@example.com')

    >>> from mailman.queue.command import Results
    >>> results = Results()

    >>> from mailman.Message import Message
    >>> print command.process(mlist, Message(), {}, ('foo', 'bar'), results)
    ContinueProcessing.yes
    >>> print unicode(results)
    The results of your email command are provided below.
    <BLANKLINE>
    echo foo bar
    <BLANKLINE>