@AlexStigmat

Почему не отправляются письма из docker через MailKit?

Привет.
Никак не могу разобраться. Есть сервис api на .net core 6, он крутится в docker, а все вместе на vps.
Не отправляются письма через MailKit. С локальной машины все отправляется.

Error MailKit.Security.SslHandshakeException: 
An error occurred while attempting to establish an SSL or TLS connection. 
This usually means that the SSL certificate presented by the server is not trusted by the system for one or more of the following reasons: 
1. The server is using a self-signed certificate which cannot be verified. 
2. The local system is missing a Root or Intermediate certificate needed to verify the server's certificate. 
3. A Certificate Authority CRL server for one or more of the certificates in the chain is temporarily unavailable. 
4. The certificate presented by the server is expired or invalid. 
5. The set of SSL/TLS protocols supported by the client and server do not match. 
6. You are trying to connect to a port which does not support SSL/TLS. 
See https://github.com/jstedfast/MailKit/blob/master/FAQ.md#ssl-handshake-exception for possible solutions. ---> System.TimeoutException: Operation timed out after 120000 milliseconds


По советам ссылки от разраба Mailkit обновил apt update && apt install -y ca-certificates

Проблема, насколько я понял, именно из-за запуска в докере, потому что сделал тестовую утилиту с отправкой почты, закинул на сервер и все отсылается.
  • Вопрос задан
  • 59 просмотров
Пригласить эксперта
Ответы на вопрос 1
@Drno
А у Вашего хостера VPS - открыт порт для отправки писем? по умолчанию они закрыты обычно
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы