76
76
>>> config.pop('auth')
78
However, a bad user name or password generates an error.
80
>>> config.push('auth', """
82
... smtp_user: baduser
83
... smtp_pass: badpass
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
95
Traceback (most recent call last):
97
SMTPAuthenticationError: (571, 'Bad authentication')
100
>>> config.pop('auth')
103
79
Sessions per connection
104
80
=======================