mirror of
https://gitlab.com/hagrid-keyserver/hagrid.git
synced 2023-02-13 20:55:02 -05:00
fix "from" address parsing
This commit is contained in:
parent
38926b4cda
commit
117ea2c168
1 changed files with 3 additions and 3 deletions
|
@ -3,7 +3,7 @@ use std::path::PathBuf;
|
|||
use failure;
|
||||
use handlebars::Handlebars;
|
||||
use lettre::{Transport as LettreTransport, SendmailTransport, file::FileTransport};
|
||||
use lettre_email::EmailBuilder;
|
||||
use lettre_email::{Mailbox,EmailBuilder};
|
||||
use url;
|
||||
use serde::Serialize;
|
||||
|
||||
|
@ -29,7 +29,7 @@ mod context {
|
|||
}
|
||||
|
||||
pub struct Service {
|
||||
from: String,
|
||||
from: Mailbox,
|
||||
base_uri: String,
|
||||
domain: String,
|
||||
templates: Handlebars,
|
||||
|
@ -63,7 +63,7 @@ impl Service {
|
|||
?.host_str().ok_or_else(|| failure::err_msg("No host in base-URI"))
|
||||
?.to_string();
|
||||
Ok(Self {
|
||||
from: from,
|
||||
from: from.parse().unwrap(),
|
||||
base_uri: base_uri,
|
||||
domain: domain,
|
||||
templates: templates,
|
||||
|
|
Loading…
Reference in a new issue