summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Korber <philippkorber@gmail.com>2018-02-28 15:07:47 +0100
committerPhilipp Korber <philippkorber@gmail.com>2018-02-28 15:07:47 +0100
commit0625db709c551486d267f837709d4ce86588b3bd (patch)
treed4880bbd395277df2c954ef96328fc225004dd11
parentca322cccdf2f1ffa5688e63bd6f58aac199b9de7 (diff)
chore(smtp): add new module and feature for tokio-smtp
-rw-r--r--Cargo.toml2
-rw-r--r--src/lib.rs2
-rw-r--r--src/smtp/mod.rs10
3 files changed, 14 insertions, 0 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 499c05d..a14972c 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -30,6 +30,7 @@ futures-cpupool = { version = "0.1.5", optional = true }
tera = { version = "0.11.1", optional = true }
conduit-mime-types = { version = "0.7.3", optional = true}
lazy_static = { version = "1.0.0", optional = true }
+tokio-smtp = { path="../depends/tokio-smtp", optional=true }
[dependencies.mime]
git="https://github.com/1aim/mime"
@@ -46,6 +47,7 @@ futures-cpupool="0.1.5"
debug_trace_tokens = []
render-template-engine = ["conduit-mime-types", "lazy_static"]
tera-bindings = ["tera", "render-template-engine"]
+smtp = ['tokio-smtp']
default = ["default_impl"]
default_impl = [
"default_impl_name_composer", "default_impl_component_id",
diff --git a/src/lib.rs b/src/lib.rs
index 4a71b9f..1085b0b 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -29,6 +29,8 @@ extern crate conduit_mime_types;
extern crate lazy_static;
#[cfg(feature="tera-bindings")]
extern crate tera as tera_crate;
+#[cfg(feature="smtp")]
+extern crate tokio_smtp;
pub mod error;
mod builder_extension;
diff --git a/src/smtp/mod.rs b/src/smtp/mod.rs
new file mode 100644
index 0000000..816b2f6
--- /dev/null
+++ b/src/smtp/mod.rs
@@ -0,0 +1,10 @@
+use std::net::SocketAddr;
+use serde::Serialize;
+
+use tokio_smtp;
+use tokio_smtp::request::{ClientId as SmtpClientId};
+use tokio_smtp::client::ClientParams;
+
+use ::context::BuilderContext;
+
+//tmp empty \ No newline at end of file