mirror of
https://github.com/soywod/himalaya.git
synced 2024-07-20 07:01:12 +00:00
review mailto command
This commit is contained in:
parent
ac75c1d37a
commit
d706a13e5e
|
@ -221,6 +221,9 @@ pub fn list<ImapService: ImapServiceInterface>(
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Parse and edit a message from a [mailto] URL string.
|
||||||
|
///
|
||||||
|
/// [mailto]: https://en.wikipedia.org/wiki/Mailto
|
||||||
pub fn mailto<ImapService: ImapServiceInterface, SmtpService: SmtpServiceInterface>(
|
pub fn mailto<ImapService: ImapServiceInterface, SmtpService: SmtpServiceInterface>(
|
||||||
url: &Url,
|
url: &Url,
|
||||||
account: &Account,
|
account: &Account,
|
||||||
|
@ -255,8 +258,8 @@ pub fn mailto<ImapService: ImapServiceInterface, SmtpService: SmtpServiceInterfa
|
||||||
from: vec![account.address()],
|
from: vec![account.address()],
|
||||||
to: vec![url.path().to_string()],
|
to: vec![url.path().to_string()],
|
||||||
encoding: ContentTransferEncoding::Base64,
|
encoding: ContentTransferEncoding::Base64,
|
||||||
bcc: Some(bcc),
|
cc: if cc.is_empty() { None } else { Some(cc) },
|
||||||
cc: Some(cc),
|
bcc: if bcc.is_empty() { None } else { Some(bcc) },
|
||||||
subject: Some(subject.into()),
|
subject: Some(subject.into()),
|
||||||
..Headers::default()
|
..Headers::default()
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue