Skip to content

Commit 8a6686b

Browse files
wynnteoWynn Teo
andauthored
BAEL-9353 (#18666)
Co-authored-by: Wynn Teo <[email protected]>
1 parent f6e765f commit 8a6686b

File tree

1 file changed

+4
-0
lines changed
  • core-java-modules/core-java-networking/src/main/java/com/baeldung/mail

1 file changed

+4
-0
lines changed

core-java-modules/core-java-networking/src/main/java/com/baeldung/mail/EmailService.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ public EmailService(String host, int port, String username, String password) {
3939
prop.put("mail.smtp.port", port);
4040
prop.put("mail.smtp.ssl.trust", host);
4141

42+
prop.put("mail.smtp.connectiontimeout", "10000");
43+
prop.put("mail.smtp.timeout", "10000");
44+
prop.put("mail.smtp.writetimeout", "10000");
45+
4246
this.username = username;
4347
this.password = password;
4448
}

0 commit comments

Comments
 (0)