> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# credentials

# `prefect_email.credentials`

Credential classes used to perform authenticated interactions with email services

## Classes

### `SMTPType` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-email/prefect\_email/credentials.py#L17](https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-email/prefect_email/credentials.py#L17)</sup>

Protocols used to secure email transmissions.

### `SMTPServer` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-email/prefect\_email/credentials.py#L27](https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-email/prefect_email/credentials.py#L27)</sup>

Server used to send email.

### `EmailServerCredentials` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-email/prefect\_email/credentials.py#L72](https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-email/prefect_email/credentials.py#L72)</sup>

Block used to manage generic email server authentication.
It is recommended you use a
[Google App Password](https://support.google.com/accounts/answer/185833)
if you use Gmail.

**Attributes:**

* `username`: The username to use for authentication to the server.
  Unnecessary if SMTP login is not required.
* `password`: The password to use for authentication to the server.
  Unnecessary if SMTP login is not required.
* `smtp_server`: Either the hostname of the SMTP server, or one of the
  keys from the built-in SMTPServer Enum members, like "gmail".
* `smtp_type`: Either "SSL", "STARTTLS", or "INSECURE".
* `smtp_port`: If provided, overrides the smtp\_type's default port number.
* `verify`: If `False`, SSL certificates will not be verified. Default to `True`.

**Methods:**

#### `get_server` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-email/prefect\_email/credentials.py#L159](https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-email/prefect_email/credentials.py#L159)</sup>

```python theme={null}
get_server(self) -> SMTP
```

Gets an authenticated SMTP server.

**Returns:**

* An authenticated SMTP server.
