chore: remove SmtpClient from the public API

We don't provide a method to construct it anyway, so it doesn't make sense
to expose it.
This commit is contained in:
Paolo Barbolini
2020-09-08 20:42:09 +02:00
committed by Alexis Mousset
parent 393d414700
commit 1c4a3f0fb3
3 changed files with 6 additions and 17 deletions

View File

@@ -1,7 +1,6 @@
#[cfg(all(test, feature = "smtp-transport", feature = "r2d2"))]
mod test {
use lettre::{Envelope, SmtpTransport, Transport};
use r2d2::Pool;
use std::{sync::mpsc, thread};
fn envelope() -> Envelope {
@@ -14,10 +13,9 @@ mod test {
#[test]
fn send_one() {
let pool = Pool::builder().max_size(1);
let mailer = SmtpTransport::builder_dangerous("127.0.0.1")
.port(2525)
.build_with_pool(pool);
.build();
let result = mailer.send_raw(&envelope(), b"test");
assert!(result.is_ok());
@@ -25,11 +23,9 @@ mod test {
#[test]
fn send_from_thread() {
let pool = Pool::builder().max_size(1);
let mailer = SmtpTransport::builder_dangerous("127.0.0.1")
.port(2525)
.build_with_pool(pool);
.build();
let (s1, r1) = mpsc::channel();
let (s2, r2) = mpsc::channel();