From 570b0593a67b623c1c6a20720d180fd1d16c2b49 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Tue, 7 Feb 2017 16:22:03 +0100 Subject: [PATCH] Document SMTP timeout settings Closes gh-8213 --- .../src/main/asciidoc/spring-boot-features.adoc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index 214ef92462..078a6bba1e 100644 --- a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -4702,6 +4702,16 @@ namespace, see the {sc-spring-boot-autoconfigure}/mail/MailProperties.{sc-ext}[`MailProperties`] for more details. +In particular, certain default timeout values are infinite and you may want to change that +to avoid having a thread blocked by an unresponsive mail server: + +[source,properties,indent=0] +---- + spring.mail.properties.mail.smtp.connecttimeout=5000 + spring.mail.properties.mail.smtp.timeout=3000 + spring.mail.properties.mail.smtp.writetimeout=5000 +---- + [[boot-features-jta]]