Skip to content

Commit

Permalink
Set imap timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
rpoet-jh committed May 6, 2024
1 parent 1dd503a commit 198562d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ private Properties getImapLoginProperties() {
javaMailProperties.setProperty("mail.imaps.ssl.trust", nihmsImapHost);
javaMailProperties.setProperty("mail.imaps.starttls.enable", "true");
javaMailProperties.setProperty("mail.imaps.auth.plain.disable", "true");
javaMailProperties.setProperty("mail.imap.connectiontimeout", "60000");
javaMailProperties.setProperty("mail.imap.timeout", "90000");
javaMailProperties.setProperty("mail.imap.writetimeout", "90000");
return javaMailProperties;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ private Properties getImapOauthProperties() {
javaMailProperties.setProperty("mail.imaps.sasl.mechanisms", "XOAUTH2");
javaMailProperties.setProperty("mail.imaps.auth.login.disable", "true");
javaMailProperties.setProperty("mail.imaps.auth.plain.disable", "true");
javaMailProperties.setProperty("mail.imap.connectiontimeout", "60000");
javaMailProperties.setProperty("mail.imap.timeout", "90000");
javaMailProperties.setProperty("mail.imap.writetimeout", "90000");
return javaMailProperties;
}

Expand Down

0 comments on commit 198562d

Please sign in to comment.