Read the http header from the proxy to get the client IP
This commit is contained in:
parent
b6235fb76c
commit
8a3fef096d
6 changed files with 29 additions and 25 deletions
|
|
@ -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<dyn std::error::Error>> {
|
||||
|
||||
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(())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue