Configuring the com.glide.email.max_read system property for the email readerSummary<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } This article explains how the email reader uses the com.glide.email.max_read system property to control inbound email retrieval from IMAP or POP3 servers, and describes when changing the default value of 20 may be appropriate. Release<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } Instructions<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } How the email reader works with the com.glide.email.max_read system property By default, the email reader connects to the mail server (IMAP or POP3 server) and checks how many emails are unread. It then retrieves the first 20 emails — the default value of com.glide.email.max_read — deletes those emails from the server (expunge), and closes the connection. If more than 20 emails are unread, the email reader immediately opens a new connection to the IMAP or POP3 server and retrieves another maximum of 20 emails before closing the connection. This cycle repeats until the IMAP or POP3 mailbox is empty. Example The following example uses a base system Utah test instance with com.glide.email.max_read set to 2 to simplify testing. Email receiving was disabled, four emails were sent to the instance email address, and then email receiving was re-enabled. Initial connection — 4 emails detected in the inbox: 2023-09-11 17:04:27 (338) worker.1 worker.1 txid=9f1533d04df1 Processing 4 emails 2023-09-11 17:04:27 (338) worker.1 worker.1 txid=9f1533d04df1 Processing email total: 4, new: 0, deleted: 0, unread: 4 First batch — 2 of 4 emails retrieved, processed, and deleted; connection closed: 2023-09-11 17:04:27 (880) worker.1 worker.1 txid=9f1533d04df1 EMAIL.7f1533d087dd711054650f67dabb35b3: Received as user: Example User 2023-09-11 17:04:27 (905) worker.1 worker.1 txid=9f1533d04df1 Message Processed true 2023-09-11 17:04:27 (905) worker.1 worker.1 txid=9f1533d04df1 EmailReader: Messages read: 2 2023-09-11 17:04:27 (909) worker.1 worker.1 txid=9f1533d04df1 Processing 2 out of 4 emails 2023-09-11 17:04:27 (910) worker.1 worker.1 txid=9f1533d04df1 expunging mailbox Approximately 60 milliseconds later, a new connection is initiated. This is part of the same transaction (txid=9f1533d04df1) and the same run of the Email Reader scheduled job. Second batch — remaining 2 of 4 emails retrieved, processed, and deleted; job run completes: 2023-09-11 17:04:28 (124) worker.1 worker.1 txid=9f1533d04df1 Message Processed true 2023-09-11 17:04:28 (124) worker.1 worker.1 txid=9f1533d04df1 EmailReader: Messages read: 4 2023-09-11 17:04:28 (128) worker.1 worker.1 txid=9f1533d04df1 Processing 4 out of 4 emails 2023-09-11 17:04:28 (129) worker.1 worker.1 txid=9f1533d04df1 expunging mailbox 2023-09-11 17:04:28 (226) worker.1 worker.1 txid=9f1533d04df1 Processed 4 emails 2023-09-11 17:04:28 (230) worker.1 worker.1 txid=9f1533d04df1 Completed: Email Reader in 0:00:02.273, next occurrence is 2023-09-12 00:06:44, id=91616b03c611227b014e3d95b7f9d1dd tr=10 pr=25 re=120 When to change com.glide.email.max_read In general, the com.glide.email.max_read system property does not need to be changed. However, changing it can help in the following specific situations: 1.The organization uses its own IMAP or POP3 mail servers, and the mail server administrator has advised that a specific number of messages per connection — different from the default of 20 — improves performance. In this case, set com.glide.email.max_read to the recommended value. 2.Up to 20 malformed emails are present in the inbox and the email reader cannot process past them. As a temporary workaround, set com.glide.email.max_read to a higher value so the email reader retrieves emails beyond the malformed ones. Resolve the underlying issue by manually removing the malformed emails from the mailbox.