mirror of
https://github.com/soywod/himalaya.git
synced 2024-07-08 18:45:13 +00:00
review move command
This commit is contained in:
parent
c7940f72ff
commit
ac75c1d37a
|
@ -146,7 +146,7 @@ pub fn attachments<OutputService: OutputServiceInterface, ImapService: ImapServi
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Copy the given message UID to the targetted mailbox.
|
/// Copy the given message UID from the selected mailbox to the targetted mailbox.
|
||||||
pub fn copy<OutputService: OutputServiceInterface, ImapService: ImapServiceInterface>(
|
pub fn copy<OutputService: OutputServiceInterface, ImapService: ImapServiceInterface>(
|
||||||
uid: &str,
|
uid: &str,
|
||||||
mbox: Option<&str>,
|
mbox: Option<&str>,
|
||||||
|
@ -268,7 +268,8 @@ pub fn mailto<ImapService: ImapServiceInterface, SmtpService: SmtpServiceInterfa
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn move_<ImapService: ImapServiceInterface>(
|
/// Move the given message UID from the selected mailbox to the targetted mailbox.
|
||||||
|
pub fn move_<OutputService: OutputServiceInterface, ImapService: ImapServiceInterface>(
|
||||||
uid: &str,
|
uid: &str,
|
||||||
mbox: Option<&str>,
|
mbox: Option<&str>,
|
||||||
output: &OutputService,
|
output: &OutputService,
|
||||||
|
@ -279,9 +280,8 @@ pub fn move_<ImapService: ImapServiceInterface>(
|
||||||
// create the msg in the target-msgbox
|
// create the msg in the target-msgbox
|
||||||
msg.flags.insert(Flag::Seen);
|
msg.flags.insert(Flag::Seen);
|
||||||
imap.append_msg(&target, &mut msg)?;
|
imap.append_msg(&target, &mut msg)?;
|
||||||
debug!("message {} successfully moved to folder `{}`", uid, target);
|
|
||||||
output.print(format!(
|
output.print(format!(
|
||||||
"Message {} successfully moved to folder `{}`",
|
r#"Message {} successfully moved to folder "{}""#,
|
||||||
uid, target
|
uid, target
|
||||||
))?;
|
))?;
|
||||||
// delete the msg in the old mailbox
|
// delete the msg in the old mailbox
|
||||||
|
|
Loading…
Reference in a new issue