mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-26 10:46:10 +00:00
Adding correct hello_name to mail.
This commit is contained in:
parent
a964b4ce21
commit
f1b5b50dc8
|
@ -105,7 +105,7 @@ pub fn send_email(
|
||||||
|
|
||||||
let mut mailer = SmtpClient::new_simple(&email_config.smtp_server)
|
let mut mailer = SmtpClient::new_simple(&email_config.smtp_server)
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.hello_name(ClientId::Domain("localhost".to_string()))
|
.hello_name(ClientId::Domain(Settings::get().hostname.to_owned()))
|
||||||
.credentials(Credentials::new(
|
.credentials(Credentials::new(
|
||||||
email_config.smtp_login.to_owned(),
|
email_config.smtp_login.to_owned(),
|
||||||
email_config.smtp_password.to_owned(),
|
email_config.smtp_password.to_owned(),
|
||||||
|
@ -117,6 +117,8 @@ pub fn send_email(
|
||||||
|
|
||||||
let result = mailer.send(email.into());
|
let result = mailer.send(email.into());
|
||||||
|
|
||||||
|
mailer.close();
|
||||||
|
|
||||||
match result {
|
match result {
|
||||||
Ok(_) => Ok(()),
|
Ok(_) => Ok(()),
|
||||||
Err(_) => Err("no_email_setup".to_string()),
|
Err(_) => Err("no_email_setup".to_string()),
|
||||||
|
|
Loading…
Reference in a new issue