summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2020-05-02 13:30:19 +0200
committerMatthias Beyer <mail@beyermatthias.de>2020-06-01 14:02:08 +0200
commit7896348d4bdf29db88ef10ce8dcd5d72b5b9be46 (patch)
tree4b2d53f43c59c3fceb72227ff05e5f60ed02c889
parentad5b894f50e83381ae4937945e0a26ef8b1318d0 (diff)
Fix: Use NameAddr to parse
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r--bin/domain/imag-mail/src/new.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/domain/imag-mail/src/new.rs b/bin/domain/imag-mail/src/new.rs
index e5c75d2e..7dcd2fae 100644
--- a/bin/domain/imag-mail/src/new.rs
+++ b/bin/domain/imag-mail/src/new.rs
@@ -254,9 +254,9 @@ impl HelperDef for GetNameHelper {
{
let p = h.param(0).ok_or_else(|| RenderError::new("Too few arguments"))?;
let p = p.value().render();
- let (addr, _) = email_format::rfc5322::types::AddrSpec::parse(p.as_bytes())
+ let (addr, _) = email_format::rfc5322::types::NameAddr::parse(p.as_bytes())
.map_err(|e| RenderError::new(format!("Failed to parse: {}", e)))?;
- out.write(&format!("{}", addr))?;
+ out.write(&format!("{}", addr.angle_addr))?;
Ok(())
}
}