X-Git-Url: http://git.euphorik.ch/?p=recipes.git;a=blobdiff_plain;f=backend%2Fsrc%2Femail.rs;fp=backend%2Fsrc%2Femail.rs;h=9b095d5f514b4442bb0c5a437279774507bed6f3;hp=a0043f7e09ec7409d6fe59230aecb5f2dc2b8b94;hb=8a3fef096d720666dc8a54789aee02250642d8a1;hpb=b6235fb76ce82f96503cda83eebe8106320b2a0d diff --git a/backend/src/email.rs b/backend/src/email.rs index a0043f7..9b095d5 100644 --- a/backend/src/email.rs +++ b/backend/src/email.rs @@ -1,8 +1,7 @@ -use lettre::{transport::smtp::{authentication::Credentials}, Message, SmtpTransport, Transport}; +use lettre::{transport::smtp::authentication::Credentials, Message, SmtpTransport, Transport}; /// pub fn send_validation(site_url: &str, email: &str, token: &str, smtp_login: &str, smtp_password: &str) -> Result<(), Box> { - let email = Message::builder() .message_id(None) .from("recipes@gburri.org".parse()?) @@ -15,7 +14,7 @@ pub fn send_validation(site_url: &str, email: &str, token: &str, smtp_login: &st let mailer = SmtpTransport::relay("mail.gandi.net")?.credentials(credentials).build(); if let Err(error) = mailer.send(&email) { - println!("Error when sending E-mail:\n{:?}", &error); + eprintln!("Error when sending E-mail:\n{:?}", &error); } Ok(())