|
|
|
@ -264,12 +264,12 @@ fn send_email(address: &str, subject: &str, body_html: &str, body_text: &str) ->
|
|
|
|
|
err!("Invalid email address (no @)");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let domain_puny = match idna::domain_to_ascii_strict(address_split[1]) {
|
|
|
|
|
let domain_puny = match idna::domain_to_ascii_strict(address_split[0]) {
|
|
|
|
|
Ok(d) => d,
|
|
|
|
|
Err(_) => err!("Can't convert email domain to ASCII representation"),
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
let address = format!("{}@{}", address_split[0], domain_puny);
|
|
|
|
|
let address = format!("{}@{}", address_split[1], domain_puny);
|
|
|
|
|
|
|
|
|
|
let html = PartBuilder::new()
|
|
|
|
|
.body(encode_to_str(body_html))
|
|
|
|
|