Use Gmail SMTP server problem with Bitwarden

Hello,
I need some help.

I’ve been trying to self-host Bitwarden on a Rocky Linux VM for over 3 days now.

I have a problem checking my email in a user account and I don’t receive the secure link to connect to the administrator account.

I get this error message on the bitwarden web page when I try to check my email:

Here is my configuration file /opt/bitwarden/bwdata/env/global.override.env :

globalSettings__baseServiceUri__vault=https://<my_ip_address>
globalSettings__baseServiceUri__cloudRegion=US
globalSettings__sqlServer__connectionString="Data Source=tcp:mssql,1433;Initial Catalog=<remove_for_screenshot>;Persist Security Info=False;User ID=sa;Password=<remove_for_screenshot>;Multiple Active Result Sets=False;Connect Timeout=30;Encrypt=True;Trust Server Certificate=True"
globalSettings__identityServer__certificatePassword=<remove_for_screenshot>
globalSettings__internalIdentityKey=<remove_for_screenshot>
globalSettings__oidcIdentityClientKey=<remove_for_screenshot>
globalSettings__duo__aKey=<remove_for_screenshot>
globalSettings__installation__id=<remove_for_screenshot>
globalSettings__installation__key=<remove_for_screenshot>
globalSettings__yubico__clientId=REPLACE
globalSettings__yubico__key=REPLACE
globalSettings__mail__replyToEmail=<my_email>@gmail.com
globalSettings__mail__smtp__host=smtp.gmail.com
globalSettings__mail__smtp__port=465
globalSettings__mail__smtp__ssl=true
globalSettings__mail__smtp__username=<my_email>@gmail.com
globalSettings__mail__smtp__password=<my_pwd>
globalSettings__disableUserRegistration=false
globalSettings__hibpApiKey=REPLACE
adminSettings__admins=<my_email>@gmail.com

I also get this error when I look at the logs with this command: docker logs -f bitwarden-api

fail: Bit.Api.Utilities.ExceptionHandlerFilterAttribute[0]
      => SpanId:4c2c9756f6b98228, TraceId:46dd29e28584ffa3730de52e2e2eac9e, ParentId:0000000000000000 => ConnectionId:0HN349R8M95H8 => RequestPath:/accounts/verify-email RequestId:0HN349R8M95H8:00000001 => Bit.Api.Auth.Controllers.AccountsController.PostVerifyEmail (Api)
      The operation has timed out.
      System.TimeoutException: The operation has timed out.
         at MailKit.Net.SocketUtils.ConnectAsync(String host, Int32 port, IPEndPoint localEndPoint, Int32 timeout, CancellationToken cancellationToken)
         at MailKit.MailService.ConnectNetworkAsync(String host, Int32 port, CancellationToken cancellationToken)
         at MailKit.Net.Smtp.SmtpClient.ConnectAsync(String host, Int32 port, SecureSocketOptions options, CancellationToken cancellationToken)
         at Bit.Core.Services.MailKitSmtpMailDeliveryService.SendEmailAsync(MailMessage message) in /home/runner/work/server/server/src/Core/Services/Implementations/MailKitSmtpMailDeliveryService.cs:line 86
         at Bit.Core.Services.HandlebarsMailService.SendVerifyEmailEmailAsync(String email, Guid userId, String token) in /home/runner/work/server/server/src/Core/Services/Implementations/HandlebarsMailService.cs:line 53
         at Bit.Core.Services.UserService.SendEmailVerificationAsync(User user) in /home/runner/work/server/server/src/Core/Services/Implementations/UserService.cs:line 547
         at Bit.Api.Auth.Controllers.AccountsController.PostVerifyEmail() in /home/runner/work/server/server/src/Api/Auth/Controllers/AccountsController.cs:line 260
         at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
         at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Logged|12_1(ControllerActionInvoker invoker)
         at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
         at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
         at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
         at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
         at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)

I followed this tutorial to use gmail as an smtp server : https://www.youtube.com/watch?v=_PhecuWHe4M
I’ve tested sending mail with GMass’ online SMTP Test Tool and I’m receiving the mails perfectly using the same parameters.

Are there any other variables to configure when using Gmail as SMTP server?

I look forward to hearing from you.