mirror of
https://github.com/chatmail/core.git
synced 2026-05-03 13:26:28 +03:00
Make chunk_size variable immutable
This commit is contained in:
@@ -47,12 +47,11 @@ impl Smtp {
|
|||||||
|
|
||||||
let message_len_bytes = message.len();
|
let message_len_bytes = message.len();
|
||||||
|
|
||||||
let mut chunk_size = DEFAULT_MAX_SMTP_RCPT_TO;
|
let chunk_size = context
|
||||||
if let Some(provider) = context.get_configured_provider().await? {
|
.get_configured_provider()
|
||||||
if let Some(max_smtp_rcpt_to) = provider.max_smtp_rcpt_to {
|
.await?
|
||||||
chunk_size = max_smtp_rcpt_to as usize;
|
.and_then(|provider| provider.max_smtp_rcpt_to)
|
||||||
}
|
.map_or(DEFAULT_MAX_SMTP_RCPT_TO, usize::from);
|
||||||
}
|
|
||||||
|
|
||||||
for recipients_chunk in recipients.chunks(chunk_size) {
|
for recipients_chunk in recipients.chunks(chunk_size) {
|
||||||
let recipients_display = recipients_chunk
|
let recipients_display = recipients_chunk
|
||||||
|
|||||||
Reference in New Issue
Block a user