[package] name = "email-lib" description = "Cross-platform, asynchronous Rust library to manage emails" version = "0.26.0" authors = ["soywod "] edition = "2021" license = "MIT" categories = ["asynchronous", "email", "network-programming"] keywords = ["email", "maildir", "imap", "smtp", "sendmail"] homepage = "https://pimalaya.org/" documentation = "https://docs.rs/email-lib/latest/email/" repository = "https://github.com/pimalaya/core/tree/master/email/" [package.metadata.docs.rs] features = ["tokio-rustls", "imap", "maildir", "sendmail", "smtp", "autoconfig", "derive", "keyring", "notify", "oauth2", "sync", "thread", "watch", "pgp-commands", "pgp-native"] rustdoc-args = ["--cfg", "docsrs"] [lib] name = "email" [features] default = [ "tokio-rustls", #"imap", #"maildir", #"notmuch", #"smtp", #"sendmail", #"autoconfig", #"derive", #"keyring", #"notify", #"oauth2", #"sync", #"thread", #"watch", #"pgp-commands", #"pgp-gpg", #"pgp-native", ] imap = [ "dep:utf7-imap", "dep:imap-client", "dep:imap-next", "tokio?/sync", ] maildir = [ "dep:maildirs", "dep:notify", "dep:rayon", "tokio?/sync", ] notmuch = [ "dep:notmuch", "maildir", ] smtp = [ "dep:mail-send", "tokio?/sync", ] sendmail = [ # nothing ] autoconfig = [ "dep:email_address", "dep:hickory-resolver", "dep:http-lib", "dep:serde", "dep:serde-xml-rs", ] derive = [ "dep:serde", "chrono/serde", "mml-lib/derive", "secret-lib/derive", "process-lib/derive", "keyring-lib?/derive", ] keyring = [ "mml-lib/keyring", "secret-lib/keyring", ] notify = [ "dep:notify-rust", ] oauth2 = [ "dep:oauth-lib", ] sync = [ "dep:advisory-lock", "dep:dirs", "maildir", ] thread = [ "dep:petgraph", ] watch = [ "tokio?/sync", ] pgp = [] # used as internal guard pgp-commands = ["mml-lib/pgp-commands", "pgp"] pgp-gpg = ["mml-lib/pgp-gpg", "pgp"] pgp-native = ["dep:pgp-lib", "dep:keyring-lib", "mml-lib/pgp-native", "pgp"] # Async runtime with Rust crypto # TODO: For now, only tokio is supported. Main blockers are: # - hickory: does not support well async-std with TLS alternatives, need to give it a try # - mail-send: does only support tokio + rustls (see https://github.com/stalwartlabs/mail-send/issues/36) # #async-std-rustls = ["async-std", "rustls"] #async-std-native-tls = ["async-std", "native-tls"] tokio-rustls = ["dep:tokio-rustls", "tokio", "rustls"] tokio-native-tls = ["dep:tokio-native-tls", "tokio", "native-tls"] # Async runtime # tokio = ["dep:tokio", "http-lib?/tokio", "keyring-lib?/tokio", "mml-lib/tokio", "oauth-lib?/tokio", "process-lib/tokio", "secret-lib/tokio"] async-std = ["dep:async-std", "http-lib?/async-std", "keyring-lib?/async-std", "mml-lib/async-std", "oauth-lib?/async-std", "process-lib/async-std", "secret-lib/async-std"] # Rust crypto # rustls = ["hickory-resolver?/dns-over-rustls", "http-lib?/rustls", "keyring-lib?/rustls", "mml-lib/rustls", "oauth-lib?/rustls", "secret-lib/rustls"] native-tls = ["hickory-resolver?/dns-over-native-tls", "http-lib?/native-tls", "keyring-lib?/openssl", "mml-lib/native-tls", "oauth-lib?/native-tls", "secret-lib/openssl"] # Vendored (mostly for OpenSSL) # vendored = ["tokio-native-tls?/vendored", "http-lib?/vendored", "keyring-lib?/vendored", "mml-lib/vendored", "oauth-lib?/vendored", "secret-lib/vendored"] [dev-dependencies] async-std = { version = "1.13", features = ["attributes"] } concat-with = "0.2" email-testing-server = { path = "../email-testing-server" } tempfile = "3.3" test-log = { version = "0.2", default-features = false, features = ["color", "trace"] } tokio = { version = "1.23", features = ["full"] } [dependencies] advisory-lock = { version = "0.3", optional = true } async-std = { version = "1.13", optional = true } async-trait = "0.1" chrono = "0.4" chumsky = { version = "=1.0.0-alpha.7", default-features = false, features = ["std", "label"] } dirs = { version = "4.0", optional = true } email-macros = "=0.0.2" email_address = { version = "0.2", optional = true, default-features = false } futures = "0.3" hickory-resolver = { version = "0.24", optional = true } http-lib = { version = "0.1", optional = true, default-features = false, path = "../http" } imap-client = { version = "=0.1.5", optional = true } imap-next = { version = "=0.3", optional = true, features = ["expose_stream", "tag_generator", "starttls", "ext_id", "ext_metadata"] } keyring-lib = { version = "1", optional = true, default-features = false, path = "../keyring" } mail-builder = "0.3" mail-parser = "0.9" mail-send = { version = "0.4", optional = true, default-features = false, features = ["logging", "tls12", "ring"] } maildirs = { version = "=0.2.2", optional = true } mml-lib = { version = "1", default-features = false, features = ["compiler", "interpreter"], path = "../mml" } notify = { version = "6", optional = true, default-features = false, features = ["macos_kqueue"] } notify-rust = { version = "4", optional = true } notmuch = { version = "=0.8.0", optional = true } oauth-lib = { version = "1", optional = true, default-features = false, path = "../oauth" } once_cell = "1" ouroboros = "0.15" paste = "1" petgraph = { version = "0.6", optional = true } pgp-lib = { version = "1", optional = true, features = ["key-discovery"], path = "../pgp" } process-lib = { version = "1", default-features = false, path = "../process" } rayon = { version = "1.6", optional = true } regex = "1.5" secret-lib = { version = "1", default-features = false, features = ["command"], path = "../secret" } serde = { version = "1", optional = true, features = ["derive"] } serde-xml-rs = { version = "0.6", optional = true } shellexpand-utils = "=0.2.1" thiserror = "1" tokio = { version = "1.23", optional = true, default-features = false, features = ["fs", "macros", "net", "rt", "time"] } tokio-native-tls = { version = "0.3", optional = true, default-features = false } tokio-rustls = { version = "0.26", optional = true, default-features = false, features = ["logging", "tls12", "ring"] } tracing = "0.1" tree_magic_mini = "3" urlencoding = "2.1" utf7-imap = { version = "=0.3.2", optional = true }