mirror of
https://github.com/chatmail/core.git
synced 2026-05-09 01:46:30 +03:00
Smtp.send: join recipients list without .collect
This commit is contained in:
committed by
link2xt
parent
ee27c7d9d4
commit
383c5ba7fd
@@ -5,6 +5,7 @@ use async_smtp::*;
|
|||||||
|
|
||||||
use crate::context::Context;
|
use crate::context::Context;
|
||||||
use crate::events::EventType;
|
use crate::events::EventType;
|
||||||
|
use itertools::Itertools;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
pub type Result<T> = std::result::Result<T, Error>;
|
pub type Result<T> = std::result::Result<T, Error>;
|
||||||
@@ -33,11 +34,7 @@ impl Smtp {
|
|||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
let message_len_bytes = message.len();
|
let message_len_bytes = message.len();
|
||||||
|
|
||||||
let recipients_display = recipients
|
let recipients_display = recipients.iter().map(|x| x.to_string()).join(",");
|
||||||
.iter()
|
|
||||||
.map(|x| format!("{}", x))
|
|
||||||
.collect::<Vec<String>>()
|
|
||||||
.join(",");
|
|
||||||
|
|
||||||
let envelope =
|
let envelope =
|
||||||
Envelope::new(self.from.clone(), recipients).map_err(Error::EnvelopeError)?;
|
Envelope::new(self.from.clone(), recipients).map_err(Error::EnvelopeError)?;
|
||||||
|
|||||||
Reference in New Issue
Block a user