# MailSourceAuthType

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Reference](https://developer.m-files.com/APIs/gRPC-API/Reference/index.md) > [Enums](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.MailSourceAuthType/

Mail source authentication type enumeration.

- **Full name:** `MFiles.MailSourceAuthType`
- **Proto file:** [`mfiles/enums.proto`](https://developer.m-files.com/APIs/gRPC-API/downloads/proto/mfiles/enums.proto)

<a id="values"></a>

## Values

| Name | Number | Description |
|---|---|---|
| <a id="v-MAIL_SOURCE_AUTH_TYPE_NONE"></a>`MAIL_SOURCE_AUTH_TYPE_NONE` | 0 | Undefined. |
| <a id="v-MAIL_SOURCE_AUTH_TYPE_BASIC"></a>`MAIL_SOURCE_AUTH_TYPE_BASIC` | 1 | Basic authentication. |
| <a id="v-MAIL_SOURCE_AUTH_TYPE_OAUTH2"></a>`MAIL_SOURCE_AUTH_TYPE_OAUTH2` | 2 | OAuth2 authentication. |

<a id="used-by-methods"></a>

## Used by methods

- [IRPCServerAdmin.GetNotificationSettings](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/GetNotificationSettings/index.md): Gets the server's notification settings and mail-sending configuration (without the SMTP password).
- [IRPCServerAdmin.SetNotificationSettings](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/SetNotificationSettings/index.md): Sets the server's notification settings: whether notifications are on, the daily digest time, and the SMTP or OAuth 2.0 mail settings used to send them.

<a id="used-in-fields"></a>

## Used in fields

- [`MailSource.mail_source_auth_type`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.MailSource/index.md#f-mail_source_auth_type): The authentication method to use.
- [`SetNotificationSettingsRequest.mail_source_auth_type`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/SetNotificationSettings/index.md#request): `MAIL_SOURCE_AUTH_TYPE_BASIC` for SMTP or `MAIL_SOURCE_AUTH_TYPE_OAUTH2` for OAuth 2.0 (then set `oauth2_settings`).
- [`GetNotificationSettingsResponse.mail_source_auth_type`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/GetNotificationSettings/index.md#response): The authentication method to use.
