Authobject to use with CRAM-MD5 authentication. Requires self.user and self.password to be set.
(self, challenge=None)
| 662 | raise SMTPAuthenticationError(code, resp) |
| 663 | |
| 664 | def auth_cram_md5(self, challenge=None): |
| 665 | """ Authobject to use with CRAM-MD5 authentication. Requires self.user |
| 666 | and self.password to be set.""" |
| 667 | # CRAM-MD5 does not support initial-response. |
| 668 | if challenge is None: |
| 669 | return None |
| 670 | return self.user + " " + hmac.HMAC( |
| 671 | self.password.encode('ascii'), challenge, 'md5').hexdigest() |
| 672 | |
| 673 | def auth_plain(self, challenge=None): |
| 674 | """ Authobject to use with PLAIN authentication. Requires self.user and |