mail-list 0.2.5-alpha

Email subscriptions list library. Unicast, narrowcast and broadcast lists
Documentation
mod email_builder;
pub use email_builder::*;

mod errors;
pub use errors::*;

#[cfg(feature = "tokio-runtime")]
mod mailer;
#[cfg(feature = "tokio-runtime")]
pub use mailer::*;

#[cfg(feature = "tokio-runtime")]
mod transport_builder;
#[cfg(feature = "tokio-runtime")]
pub use transport_builder::*;

pub use email_address;

#[cfg(feature = "tokio-runtime")]
pub use lettre;

#[cfg(test)]
mod test_smtp_service {

    // use crate::*;

    // TODO
    // #[test]
    // fn test_secure_smtp() {
    //     let runtime = tokio::runtime::Runtime::new().unwrap();

    //     let creds = std::env::var("SMTP_AUTH").unwrap();

    //     runtime.block_on(async move {
    //         let mut mailer = SmtpsBuilder::new();
    //         mailer
    //             .set_from("Support <support@domain.tld>")
    //             .set_hello_name("domain.tld")
    //             .set_reply_to("Support <support@domain.tld>");
    //         let mailer = mailer.build(&creds).unwrap();

    //         let my_mail = EmailEnvelopeDetails::new()
    //             .set_to("Foo Bar <foo@example.com>")
    //             .set_subject("Mail Completed")
    //             .set_body("Has been successful");
    //         mailer.send(&my_mail).await.unwrap();
    //     });
    // }
}