!1. Google Mail OAuth 2.0\\ __Google Mail__ through __SMTP__/__IMAP__ requires __OAuth 2.0__ ([OAuth Wikipedia Link|https://en.wikipedia.org/wiki/OAuth]) for authentication. (More information : [Google IMAP-SMTP Link|https://developers.google.com/gmail/imap/imap-smtp]).\\ \\ __!!! Proxy Configuration:__ If your server accesses the internet through a proxy, make sure to whitelist the following domains for Google Mail Authentication:\\ • oauth2.googleapis.com\\ \\ Start by navigating to Google APIs & Services: [Google APIs & Services Link|https://console.developers.google.com/projectselector/apis/credentials]\\ __!!!Note:__ Ensure sure the __GMAIL API__ is enabled at __Enabled APIs & services__. [Google API Library Link|https://console.cloud.google.com/apis/library]\\ \\ [SMTP Google Mail Integration/g_api_services.png]\\ \\ [SMTP Google Mail Integration/gmail_api_enabled.png]\\ \\ Go to the __Credentials__ menu, click on __Create Credentials__, and select __OAuth client ID__:\\ \\ [SMTP Google Mail Integration/create_credentials.png]\\ \\ Select the application type: __Web application__. Provide a unique name. Then, configure the __Authorized redirect URI__—this is where Google will redirect you after authorization. The Redirect URL must end with __?command=register_google_mail_api__.\\ \\ {{{ http://127.0.0.1:9090/?command=register_google_mail_api }}}\\ or {{{ https://your.crushftp.domain.com/?command=register_google_mail_api }}}\\ Finally, click the __Create__ button.\\ \\ [attachments|credential_config.png]\\ \\ After the credentials are created, copy the __Client ID__ and __Client Secret__.\\ \\ [SMTP Google Mail Integration/client_id_secret.png]\\ \\ ---- !2. SMTP Settings\\ \\ [SMTP Google Mail Integration/smtp_config.png]\\ \\ __SMTP Server Used for Emailing__: Enter the SMTP server address used for sending emails, such as __smtp.gmail.com__, using the default port __587__.\\ {{{ smtp.gmail.com:587 }}}\\ \\ __SMTP Server Username, Password__: If the SMTP server address contains __office365__ or __outlook__, the corresponding __Get Refresh Token__ button will appear. Click that button to proceed.\\ __!!! Note__: To obtain the __Refresh Token__, the CrushFTP WebInterface’s host and port must match the __Redirect URL__ specified in the __Azure App Registration__. In our example, it was: http://localhost:9090 or https://your.crushftp.domain.com/\\ \\ Enter the __Client ID__ (See at App Registration -> Overview -> Application (client) ID), __Client Secret__ (See at App Registration -> Manage -> Certificates & secrets) make sure to copy the __value__ field, not the ID, and __Tenant ID__ (See at App Registration -> Overview -> Directory (tenant) ID). Proceed with the authentication and authorization process. This will automatically configure the __SMTP Server Username__ and __SMTP Server Password__.\\ \\ [attachments|oauth_form.png]\\ \\ If your domain is not verified you will get a warning message, click on Advanced and proceed further:\\ \\ [SMTP Google Mail Integration/not_verified_domain.png]\\ \\ Click on allow:\\ \\ [SMTP Google Mail Integration/allow_form.png]\\ \\ Once it is finished the "SMTP Server Password" input field will be filled with the refresh token.\\ \\