## smtp.Password


A password is the username and password [SMTPBackend](SMTPBackend.md#epistole.SMTPBackend) authenticates with, through PLAIN, LOGIN or CRAM-MD5.


Usage

``` python
smtp.Password(
    username,
    password,
)
```


[connect()](Backend.md#epistole.Backend.connect) uses the first of the three that the server offers, and no other after a `535`. It raises [AuthenticationError](exceptions.AuthenticationError.md#epistole.exceptions.AuthenticationError) without sending the password when the server offers none of them. See ADR-0011.

`smtplib` encodes both as ASCII, so [connect()](Backend.md#epistole.Backend.connect) raises `UnicodeEncodeError` for any other character.


## Attributes


`username: str`  
The name the server authenticates, often the from address.

`password: str`  
The secret. It is not in the `repr`, so no traceback or log line holds it.
