~sumanah/mailman/mailman

« back to all changes in this revision

Viewing changes to src/mailman/mta/docs/connection.rst

  • Committer: Sumana Harihareswara
  • Date: 2015-01-08 21:35:58 UTC
  • mfrom: (7273.2.15 3.0)
  • Revision ID: sumanah@panix.com-20150108213558-65ym6553zj256z8p
mergeĀ fromĀ master

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
    >>> reset()
76
76
    >>> config.pop('auth')
77
77
 
78
 
However, a bad user name or password generates an error.
79
 
 
80
 
    >>> config.push('auth', """
81
 
    ... [mta]
82
 
    ... smtp_user: baduser
83
 
    ... smtp_pass: badpass
84
 
    ... """)
85
 
 
86
 
    >>> connection = Connection(
87
 
    ...     config.mta.smtp_host, int(config.mta.smtp_port), 0,
88
 
    ...     config.mta.smtp_user, config.mta.smtp_pass)
89
 
    >>> connection.sendmail('anne@example.com', ['bart@example.com'], """\
90
 
    ... From: anne@example.com
91
 
    ... To: bart@example.com
92
 
    ... Subject: aardvarks
93
 
    ...
94
 
    ... """)
95
 
    Traceback (most recent call last):
96
 
    ...
97
 
    SMTPAuthenticationError: (571, 'Bad authentication')
98
 
 
99
 
    >>> reset()
100
 
    >>> config.pop('auth')
101
 
 
102
78
 
103
79
Sessions per connection
104
80
=======================