1
0
Fork 0
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:
Vincent Breitmoser 2019-06-06 18:17:58 +02:00
parent 38926b4cda
commit 117ea2c168
No known key found for this signature in database
GPG key ID: 7BD18320DEADFA11

View file

@ -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,