"libnotmuch5 was not found in your system. Make sure it is installed and in the library paths. For a custom file path, use `library_file_path` setting in your notmuch account.\n";
pubconstNOTMUCH_ERROR_MSG: &str="this version of meli is not compiled with notmuch support. Use an appropriate version and make sure libnotmuch5 is installed and in the library paths.\n";
Ok((new_hash,new_mailbox_fut?.await.map_err(|err|Error::new(format!("Mailbox create was succesful (returned `{}`) but listing mailboxes afterwards returned `{}`",String::from_utf8_lossy(&response),err)))?))
returnErr(Error::new(format!("You do not have permission to delete `{}`. Set permissions for this mailbox are {}",mailboxes[&mailbox_hash].name(),permissions)));
new_mailbox_fut?.await.map_err(|err|format!("Mailbox delete was succesful (returned `{}`) but listing mailboxes afterwards returned `{}`",String::from_utf8_lossy(&response),err).into())
returnErr(Error::new(format!("You do not have permission to rename mailbox `{}` (rename is equivalent to delete + create). Set permissions for this mailbox are {}",mailboxes[&mailbox_hash].name(),permissions)));
new_mailbox_fut?.await.map_err(|err|format!("Mailbox rename was succesful (returned `{}`) but listing mailboxes afterwards returned `{}`",String::from_utf8_lossy(&response),err))?;
returnErr(Error::new(format!("You do not have permission to change permissions for mailbox `{}`. Set permissions for this mailbox are {}",mailboxes[&mailbox_hash].name(),permissions)));
).chain_err_summary(||format!("Could not insert envelope {} {} in header_cache of account {}",envelope.message_id(),envelope.hash(),uid_store.account_name))?;
/* sending CAPABILITY after LOGIN automatically is an RFC recommendation, so check
*forlazyservers*/
/* sending CAPABILITY after LOGIN automatically is an RFC recommendation, so
*checkforlazyservers*/
drop(capabilities);
ret.send_command(b"CAPABILITY").await?;
ret.read_response(&mutres).await.unwrap();
@ -648,7 +658,14 @@ impl ImapConnection {
|ImapResponse::Bad(code)
|ImapResponse::Preauth(code)
|ImapResponse::Bye(code)=>{
crate::log(format!("Could not use COMPRESS=DEFLATE in account `{}`: server replied with `{}`",self.uid_store.account_name,code),crate::LoggingLevel::WARN);
///The human-readable text contains a special alert that MUST be presented to the user in a fashion that calls the user's attention to the message.
///The human-readable text contains a special alert that MUST be presented
/// to the user in a fashion that calls the user's attention to the message.
Alert(String),
///Optionally followed by a parenthesized list of charsets. A SEARCH failed because the given charset is not supported by this implementation. If the optional list of charsets is given, this lists the charsets that are supported by this implementation.
///Optionally followed by a parenthesized list of charsets. A SEARCH
/// failed because the given charset is not supported by this
/// implementation. If the optional list of charsets is given, this lists
/// the charsets that are supported by this implementation.
Badcharset(Option<String>),
/// Followed by a list of capabilities. This can appear in the initial OK or PREAUTH response to transmit an initial capabilities list. This makes it unnecessary for a client to send a separate CAPABILITY command if it recognizes this response.
/// Followed by a list of capabilities. This can appear in the initial OK
/// or PREAUTH response to transmit an initial capabilities list. This
/// makes it unnecessary for a client to send a separate CAPABILITY command
/// if it recognizes this response.
Capability,
/// The human-readable text represents an error in parsing the [RFC-2822] header or [MIME-IMB] headers of a message in the mailbox.
/// The human-readable text represents an error in parsing the [RFC-2822]
/// header or [MIME-IMB] headers of a message in the mailbox.
Parse(String),
/// Followed by a parenthesized list of flags, indicates which of the known flags the client can change permanently. Any flags that are in the FLAGS untagged response, but not the PERMANENTFLAGS list, can not be set permanently. If the client attempts to STORE a flag that is not in the PERMANENTFLAGS list, the server will either ignore the change or store the state change for the remainder of the current session only. The PERMANENTFLAGS list can also include the special flag \*, which indicates that it is possible to create new keywords by attempting to store those flags in the mailbox.
/// Followed by a parenthesized list of flags, indicates which of the known
/// flags the client can change permanently. Any flags that are in the
/// FLAGS untagged response, but not the PERMANENTFLAGS list, can not be set
/// permanently. If the client attempts to STORE a flag that is not in the
/// PERMANENTFLAGS list, the server will either ignore the change or store
/// the state change for the remainder of the current session only. The
/// PERMANENTFLAGS list can also include the special flag \*, which
/// indicates that it is possible to create new keywords by attempting to
/// store those flags in the mailbox.
Permanentflags(String),
/// The mailbox is selected read-only, or its access while selected has changed from read-write to read-only.
/// The mailbox is selected read-only, or its access while selected has
/// changed from read-write to read-only.
ReadOnly,
/// The mailbox is selected read-write, or its access while selected has changed from read-only to read-write.
/// The mailbox is selected read-write, or its access while selected has
/// changed from read-only to read-write.
ReadWrite,
/// An APPEND or COPY attempt is failing because the target mailbox does not exist (as opposed to some other reason). This is a hint to the client that the operation can succeed if the mailbox is first created by the CREATE command.
/// An APPEND or COPY attempt is failing because the target mailbox does not
/// exist (as opposed to some other reason). This is a hint to the client
/// that the operation can succeed if the mailbox is first created by the
/// CREATE command.
Trycreate,
/// Followed by a decimal number, indicates the next unique identifier value. Refer to section 2.3.1.1 for more information.
/// Followed by a decimal number, indicates the next unique identifier
/// value. Refer to section 2.3.1.1 for more information.
Uidnext(UID),
/// Followed by a decimal number, indicates the unique identifier validity value. Refer to section 2.3.1.1 for more information.
/// Followed by a decimal number, indicates the unique identifier validity
/// value. Refer to section 2.3.1.1 for more information.
Uidvalidity(UID),
/// Followed by a decimal number, indicates the number of the first message without the \Seen flag set.
/// Followed by a decimal number, indicates the number of the first message
/// without the \Seen flag set.
Unseen(ImapNum),
}
@ -195,15 +223,23 @@ impl std::fmt::Display for ResponseCode {
/// This enum represents the server's untagged responses detailed in `7. Server Responses` of RFC 3501 INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1
/// This enum represents the server's untagged responses detailed in `7. Server
/// Responses` of RFC 3501 INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1
"({}) `use_token` use requires either the `server_password_command` set with a command that returns an Bearer token of your account, or `server_password` with the API Bearer token as a string. Consult documentation for guidance.",
leterr=Error::new(format!("BUG: Could not deserialize {} server JSON response properly, please report this!\nReply from server: {}",&conn.server_conf.server_url,&res_text)).set_source(Some(Arc::new(err))).set_kind(ErrorKind::Bug);
leterr=Error::new(format!("BUG: Could not deserialize {} server JSON response properly, please report this!\nReply from server: {}",&conn.server_conf.server_url,&res_text)).set_source(Some(Arc::new(err))).set_kind(ErrorKind::Bug);
leterr=Error::new(format!("BUG: Could not deserialize {} server JSON response properly, please report this!\nReply from server: {}",&conn.server_conf.server_url,&res_text)).set_source(Some(Arc::new(err))).set_kind(ErrorKind::Bug);
leterr=Error::new(format!("BUG: Could not deserialize {} server JSON response properly, please report this!\nReply from server: {}",&conn.server_conf.server_url,&res_text)).set_source(Some(Arc::new(err))).set_kind(ErrorKind::Bug);
leterr=Error::new(format!("BUG: Could not deserialize {} server JSON response properly, please report this!\nReply from server: {}",&conn.server_conf.server_url,&res_text)).set_source(Some(Arc::new(err))).set_kind(ErrorKind::Bug);
leterr=Error::new(format!("Could not connect to JMAP server endpoint for {}. Is your server url setting correct? (i.e. \"jmap.mailserver.org\") (Note: only session resource discovery via /.well-known/jmap is supported. DNS SRV records are not suppported.)\nError connecting to server: {}",&self.server_conf.server_url,&err)).set_source(Some(Arc::new(err)));
leterr=Error::new(format!("Could not connect to JMAP server endpoint for {}. Is your server url setting correct? (i.e. \"jmap.mailserver.org\") (Note: only session resource discovery via /.well-known/jmap is supported. DNS SRV records are not suppported.)\nReply from server: {}",&self.server_conf.server_url,&res_text)).set_source(Some(Arc::new(err)));
leterr=Error::new(format!("Server {} did not return JMAP Core capability (urn:ietf:params:jmap:core). Returned capabilities were: {}",&self.server_conf.server_url,session.capabilities.keys().map(String::as_str).collect::<Vec<&str>>().join(", ")));
leterr=Error::new(format!("Server {} does not support JMAP Mail capability (urn:ietf:params:jmap:mail). Returned capabilities were: {}",&self.server_conf.server_url,session.capabilities.keys().map(String::as_str).collect::<Vec<&str>>().join(", ")));
leterr=Error::new(format!("BUG: Could not deserialize {} server JSON response properly, please report this!\nReply from server: {}",&self.server_conf.server_url,&res_text)).set_source(Some(Arc::new(err))).set_kind(ErrorKind::Bug);
serde_json::from_str(t.get()).map_err(|err|crate::error::Error::new(format!("BUG: Could not deserialize server JSON response properly, please report this!\nReply from server: {}",&t)).set_source(Some(Arc::new(err))).set_kind(ErrorKind::Bug))?;
serde_json::from_str(t.get()).map_err(|err|crate::error::Error::new(format!("BUG: Could not deserialize server JSON response properly, please report this!\nReply from server: {}",&t)).set_source(Some(Arc::new(err))).set_kind(ErrorKind::Bug))?;
leterr=Error::new(format!("BUG: Could not deserialize {} server JSON response properly, please report this!\nReply from server: {}",&conn.server_conf.server_url,&res_text)).set_source(Some(Arc::new(err))).set_kind(ErrorKind::Bug);
leterr=Error::new(format!("BUG: Could not deserialize {} server JSON response properly, please report this!\nReply from server: {}",&conn.server_conf.server_url,&res_text)).set_source(Some(Arc::new(err))).set_kind(ErrorKind::Bug);
leterr=Error::new(format!("BUG: Could not deserialize {} server JSON response properly, please report this!\nReply from server: {}",&conn.server_conf.server_url,&res_text)).set_source(Some(Arc::new(err))).set_kind(ErrorKind::Bug);
serde_json::from_str(t.get()).map_err(|err|crate::error::Error::new(format!("BUG: Could not deserialize server JSON response properly, please report this!\nReply from server: {}",&t)).set_source(Some(Arc::new(err))).set_kind(crate::error::ErrorKind::Bug))?;
serde_json::from_str(t.get()).map_err(|err|crate::error::Error::new(format!("BUG: Could not deserialize server JSON response properly, please report this!\nReply from server: {}",&t)).set_source(Some(Arc::new(err))).set_kind(crate::error::ErrorKind::Bug))?;
serde_json::from_str(t.get()).map_err(|err|crate::error::Error::new(format!("BUG: Could not deserialize server JSON response properly, please report this!\nReply from server: {}",&t)).set_source(Some(Arc::new(err))).set_kind(crate::error::ErrorKind::Bug))?;
serde_json::from_str(t.get()).map_err(|err|crate::error::Error::new(format!("BUG: Could not deserialize server JSON response properly, please report this!\nReply from server: {}",&t)).set_source(Some(Arc::new(err))).set_kind(crate::error::ErrorKind::Bug))?;
///(create; update; destroy). The create/update/destroy would violate an ACL or other permissions policy.
///(create; update; destroy). The create/update/destroy would violate an
/// ACL or other permissions policy.
Forbidden(Option<String>),
///(create; update). The create would exceed a server- defined limit on the number or total size of objects of this type.
///(create; update). The create would exceed a server- defined limit on
/// the number or total size of objects of this type.
OverQuota(Option<String>),
///(create; update). The create/update would result in an object that exceeds a server-defined limit for the maximum size of a single object of this type.
///(create; update). The create/update would result in an object that
/// exceeds a server-defined limit for the maximum size of a single object
/// of this type.
TooLarge(Option<String>),
///(create). Too many objects of this type have been created recently, and a server-defined rate limit has been reached. It may work if tried again later.
///(create). Too many objects of this type have been created recently, and
/// a server-defined rate limit has been reached. It may work if tried
/// again later.
RateLimit(Option<String>),
///(update; destroy). The id given to update/destroy cannot be found.
NotFound(Option<String>),
///(update). The PatchObject given to update the record was not a valid patch (see the patch description).
///(update). The PatchObject given to update the record was not a valid
/// patch (see the patch description).
InvalidPatch(Option<String>),
///(update). The client requested that an object be both updated and destroyed in the same /set request, and the server has decided to therefore ignore the update.
///(update). The client requested that an object be both updated and
/// destroyed in the same /set request, and the server has decided to
/// therefore ignore the update.
WillDestroy(Option<String>),
///(create; update). The record given is invalid in some way.
InvalidProperties{
description: Option<String>,
properties: Vec<String>,
},
///(create; destroy). This is a singleton type, so you cannot create another one or destroy the existing one.
///(create; destroy). This is a singleton type, so you cannot create
/// another one or destroy the existing one.
Singleton(Option<String>),
RequestTooLarge(Option<String>),
StateMismatch(Option<String>),
@ -1001,8 +1044,9 @@ pub struct UploadResponse {
pubaccount_id: Id<Account>,
///o blobId: "Id"
///
///The id representing the binary data uploaded. The data for this id is immutable.
///The id *only* refers to the binary data, not any metadata.
///The id representing the binary data uploaded. The data for this id is
/// immutable. The id *only* refers to the binary data, not any
/// metadata.
pubblob_id: Id<BlobObject>,
///o type: "String"
///
@ -1098,11 +1142,15 @@ where
pubstructQueryChangesResponse<OBJ: Object>{
/// The id of the account used for the call.
pubaccount_id: Id<Account>,
/// This is the "sinceQueryState" argument echoed back; that is, the state from which the server is returning changes.
/// This is the "sinceQueryState" argument echoed back; that is, the state
/// from which the server is returning changes.
pubold_query_state: String,
///This is the state the query will be in after applying the set of changes to the old state.
///This is the state the query will be in after applying the set of changes
/// to the old state.
pubnew_query_state: String,
/// The total number of Foos in the results (given the "filter"). This argument MUST be omitted if the "calculateTotal" request argument is not true.
/// The total number of Foos in the results (given the "filter"). This
/// argument MUST be omitted if the "calculateTotal" request argument is not
/// true.
#[serde(default)]
pubtotal: Option<usize>,
///The "id" for every Foo that was in the query results in the old
//! `mbox` describes a family of incompatible legacy formats.
//!
//! "All of the 'mbox' formats store all of the messages in the mailbox in a single file. Delivery appends new messages to the end of the file." [^0]
//! "All of the 'mbox' formats store all of the messages in the mailbox in a
//! single file. Delivery appends new messages to the end of the file." [^0]
//!
//! "Each message is preceded by a From_ line and followed by a blank line. A From_ line is a line that begins with the five characters 'F', 'r', 'o', 'm', and ' '." [^0]
//! "Each message is preceded by a From_ line and followed by a blank line. A
//! From_ line is a line that begins with the five characters 'F', 'r', 'o',
//! 'm', and ' '." [^0]
//!
//! ## `From ` / postmark line
//!
//! "An mbox is a text file containing an arbitrary number of e-mail messages. Each message
//! consists of a postmark, followed by an e-mail message formatted according to RFC822, RFC2822.
//! The file format is line-oriented. Lines are separated by line feed characters (ASCII 10).
//! "An mbox is a text file containing an arbitrary number of e-mail messages.
//! Each message consists of a postmark, followed by an e-mail message formatted
//! according to RFC822, RFC2822. The file format is line-oriented. Lines are
//! separated by line feed characters (ASCII 10).
//!
//! "A postmark line consists of the four characters 'From', followed by a space character,
//! followed by the message's envelope sender address, followed by whitespace, and followed by a
//! time stamp. This line is often called From_ line.
//! "A postmark line consists of the four characters 'From', followed by a space
//! character, followed by the message's envelope sender address, followed by
//! whitespace, and followed by a time stamp. This line is often called From_
//! line.
//!
//! "The sender address is expected to be addr-spec as defined in RFC2822 3.4.1. The date is expected
//! to be date-time as output by asctime(3). For compatibility reasons with legacy software,
//! two-digit years greater than or equal to 70 should be interpreted as the years 1970+, while
//! two-digit years less than 70 should be interpreted as the years 2000-2069. Software reading
//! files in this format should also be prepared to accept non-numeric timezone information such as
//! 'CET DST' for Central European Time, daylight saving time.
//! "The sender address is expected to be addr-spec as defined in RFC2822 3.4.1.
//! The date is expected to be date-time as output by asctime(3). For
//! compatibility reasons with legacy software, two-digit years greater than or
//! equal to 70 should be interpreted as the years 1970+, while two-digit years
//! less than 70 should be interpreted as the years 2000-2069. Software reading
//! files in this format should also be prepared to accept non-numeric timezone
//! information such as 'CET DST' for Central European Time, daylight saving
//! time.
//!
//! "Example:
//!
//!```text
//!From example@example.com Fri Jun 23 02:56:55 2000
//!```
//!From example@example.com Fri Jun 23 02:56:55 2000
//!```
//!
//! "In order to avoid misinterpretation of lines in message bodies which begin with the four
//! characters 'From', followed by a space character, the mail delivery agent must quote
//! any occurrence of 'From ' at the start of a body line." [^2]
//! "In order to avoid misinterpretation of lines in message bodies which begin
//! with the four characters 'From', followed by a space character, the mail
//! delivery agent must quote any occurrence of 'From ' at the start of a body
//! line." [^2]
//!
//! ## Metadata
//!
@ -77,7 +85,8 @@
//! # use std::collections::HashMap;
//! # use std::sync::{Arc, Mutex};
//! let file_contents = vec![]; // Replace with actual mbox file contents
//! let index: Arc<Mutex<HashMap<EnvelopeHash, (Offset, Length)>>> = Arc::new(Mutex::new(HashMap::default()));
//! let index: Arc<Mutex<HashMap<EnvelopeHash, (Offset, Length)>>> =
//! Arc::new(Mutex::new(HashMap::default()));
//! let mut message_iter = MessageIterator {
//! index: index.clone(),
//! input: &file_contents.as_slice(),
@ -100,9 +109,9 @@
//! format.append(
//! &mut file,
//! mbox_1,
//! None, // Envelope From
//! None, // Envelope From
//! Some(melib::datetime::now()), // Delivered date
l_pid: 0,/* "By contrast with traditional record locks, the l_pid field of that structure must be set to zero when using the commands described below." */
l_pid: 0,/* "By contrast with traditional record locks, the l_pid field of that
@ -253,9 +258,21 @@ impl MailBackend for NntpType {
letuid_store=self.uid_store.clone();
letconnection=self.connection.clone();
Ok(Box::pin(asyncmove{
/* To get updates, either issue NEWNEWS if it's supported by the server, and fallback
*toOVERotherwise*/
letmbox: NntpMailbox=uid_store.mailboxes.lock().await.get(&mailbox_hash).map(std::clone::Clone::clone).ok_or_else(||Error::new(format!("Mailbox with hash {} not found in NNTP connection, this could possibly be a bug or it was deleted.",mailbox_hash)))?;
/* To get updates, either issue NEWNEWS if it's supported by the server, and
returnErr(Error::new(format!("Notmuch `library_file_path` setting value `{}` for account {} does not exist or is a directory or not a valid library file.",dlpath,s.name()))
//let words = "[Advcomparch] =?utf-8?b?zqPPhc68z4DOtc+BzrnPhs6/z4HOrCDPg861IGZs?=\n\t=?utf-8?b?dXNoIM67z4zOs8+JIG1pc3ByZWRpY3Rpb24gzrrOsc+Ezqwgz4TOt869?=\n\t=?utf-8?b?IM61zrrPhM6tzrvOtc+Dzrcgc3RvcmU=?=";
//! - [RFC2369 "The Use of URLs as Meta-Syntax for Core Mail List Commands and their Transport through Message Header Fields"](https://tools.ietf.org/html/rfc2369)
usesuper::*;
usegeneric::cfws;
///Parse the value of headers defined in RFC2369 "The Use of URLs as Meta-Syntax for Core
///Mail List Commands and their Transport through Message Header Fields"
usesuper::*;
///Parse the value of headers defined in RFC2369 "The Use of URLs as
/// Meta-Syntax for Core Mail List Commands and their Transport through
//! A crate that performs mail client operations such as
//! - Hold an [`Envelope`](./email/struct.Envelope.html) with methods convenient for mail client use. (see module [`email`](./email/index.html))
//! - Abstract through mail storages through the [`MailBackend`](./backends/trait.MailBackend.html) trait, and handle read/writes/updates through it. (see module [`backends`](./backends/index.html))
//! - Decode attachments (see module [`email::attachments`](./email/attachments/index.html))
//! - Hold an [`Envelope`](./email/struct.Envelope.html) with methods convenient
//! for mail client use. (see module [`email`](./email/index.html))
//! - Abstract through mail storages through the
//! [`MailBackend`](./backends/trait.MailBackend.html) trait, and handle
//! - Create new mail (see [`email::Draft`](./email/compose/struct.Draft.html))
//! - Send mail with an SMTP client (see module [`smtp`](./smtp/index.html))
//! - Manage an `addressbook` i.e. have contacts (see module [`addressbook`](./addressbook/index.html))
//! - Build thread structures out of a list of mail via their `In-Reply-To` and `References` header values (see module [`thread`](./thread/index.html))
//! - Manage an `addressbook` i.e. have contacts (see module
//! [`addressbook`](./addressbook/index.html))
//! - Build thread structures out of a list of mail via their `In-Reply-To` and
//! `References` header values (see module [`thread`](./thread/index.html))
//!
//! Other exports are
//! - Basic mail account configuration to use with [`backends`](./backends/index.html) (see module [`conf`](./conf/index.html))
//! - Basic mail account configuration to use with
//! [`backends`](./backends/index.html) (see module
//! [`conf`](./conf/index.html))
//! - Parser combinators (see module [`parsec`](./parsec/index.html))
//! - A `ShellExpandTrait` to expand paths like a shell.
//! - A `debug` macro that works like `std::dbg` but for multiple threads. (see [`debug` macro](./macro.debug.html))
//! - A `debug` macro that works like `std::dbg` but for multiple threads. (see
//! [`debug` macro](./macro.debug.html))
#[macro_use]
pubmoddbg{
@ -102,8 +112,7 @@ pub use datetime::UnixTimestamp;
#[macro_use]
modlogging;
pubuseself::logging::LoggingLevel::*;
pubuseself::logging::*;
pubuseself::logging::{LoggingLevel::*,*};
pubmodaddressbook;
pubuseaddressbook::*;
@ -180,12 +189,15 @@ impl core::fmt::Display for Bytes {
returnErr(Error::new("SMTP submission was aborted because there was no e-mail address found in the From: header field. Consider adding a valid value or setting `envelope_from` in SMTP client settings"));
returnErr(Error::new("SMTP submission was aborted because there was more than one e-mail address found in the From: header field. Consider setting `envelope_from` in SMTP client settings"));
/// Help message (Information on how to use the receiver or the meaning of a particular non-standard command; this reply is useful only to the human user)
/// Help message (Information on how to use the receiver or the meaning of a
/// particular non-standard command; this reply is useful only to the human
/// user)
_214,
/// <domain> Service ready
_220,
@ -772,7 +798,8 @@ pub enum ReplyCode {
_250,
/// User not local; will forward to <forward-path> (See Section 3.4)
_251,
/// Cannot VRFY user, but will accept message and attempt delivery (See Section 3.5.3)
/// Cannot VRFY user, but will accept message and attempt delivery (See
/// Section 3.5.3)
_252,
/// rfc4954 AUTH continuation request
_334,
@ -780,9 +807,11 @@ pub enum ReplyCode {
_353,
/// Start mail input; end with <CRLF>.<CRLF>
_354,
/// <domain> Service not available, closing transmission channel (This may be a reply to any command if the service knows it must shut down)
/// <domain> Service not available, closing transmission channel (This may
/// be a reply to any command if the service knows it must shut down)
_421,
/// Requested mail action not taken: mailbox unavailable (e.g., mailbox busy or temporarily blocked for policy reasons)
/// Requested mail action not taken: mailbox unavailable (e.g., mailbox busy
/// or temporarily blocked for policy reasons)
_450,
/// Requested action aborted: local error in processing
_451,
@ -790,7 +819,8 @@ pub enum ReplyCode {
_452,
/// Server unable to accommodate parameters
_455,
/// Syntax error, command unrecognized (This may include errors such as command line too long)
/// Syntax error, command unrecognized (This may include errors such as
/// command line too long)
_500,
/// Syntax error in parameters or arguments
_501,
@ -802,15 +832,18 @@ pub enum ReplyCode {
_504,
/// Authentication failed
_535,
/// Requested action not taken: mailbox unavailable (e.g., mailbox not found, no access, or command rejected for policy reasons)
/// Requested action not taken: mailbox unavailable (e.g., mailbox not
/// found, no access, or command rejected for policy reasons)
_550,
/// User not local; please try <forward-path> (See Section 3.4)
_551,
/// Requested mail action aborted: exceeded storage allocation
_552,
/// Requested action not taken: mailbox name not allowed (e.g., mailbox syntax incorrect)
/// Requested action not taken: mailbox name not allowed (e.g., mailbox
/// syntax incorrect)
_553,
/// Transaction failed (Or, in the case of a connection-opening response, "No SMTP service here")
/// Transaction failed (Or, in the case of a connection-opening response,
/// "No SMTP service here")
_554,
/// MAIL FROM/RCPT TO parameters not recognized or not implemented
_555,
@ -844,10 +877,16 @@ impl ReplyCode {
_503=>"Bad sequence of commands",
_504=>"Command parameter not implemented",
_535=>"Authentication failed",
_550=>"Requested action not taken: mailbox unavailable (e.g., mailbox not found, no access, or command rejected for policy reasons)",
// "Formally, a reply is defined to be the sequence: a three-digit code, <SP>, one line of text, and <CRLF>, or a multiline reply (as defined in the same section)."
// "Formally, a reply is defined to be the sequence: a three-digit code, <SP>,
// one line of text, and <CRLF>, or a multiline reply (as defined in the same
/// edit configuration files in `$EDITOR`/`$VISUAL`.
EditConfig,
/// create a sample configuration file with available configuration options. If PATH is not specified, meli will try to create it in $XDG_CONFIG_HOME/meli/config.toml
/// create a sample configuration file with available configuration options.
/// If PATH is not specified, meli will try to create it in
@ -230,7 +230,20 @@ impl Component for NotificationCommand {
}else{
#[cfg(target_os = "macos")]
{
letapplescript=format!("display notification \"{message}\" with title \"{title}\" subtitle \"{subtitle}\"",message=body.replace('"',"'"),title=title.as_ref().map(String::as_str).unwrap_or("meli").replace('"',"'"),subtitle=kind.map(|k|k.to_string()).unwrap_or_default().replace('"',"'"));