sanitize_address
Format a pair of (name, address) or an email address string.
def sanitize_address(
addr: string | tuple,
encoding: string
) - > string
Format a pair of (name, address) or an email address string.
Parameters
| Name | Type | Description |
|---|---|---|
| addr | `string | tuple` |
| encoding | string | The character set used to encode non-ASCII characters in the display name or local part of the address. |
Returns
| Type | Description |
|---|---|
string | A RFC-compliant formatted email address string, with appropriate header encoding and punycode applied to the domain. |