|
|
@ -787,16 +787,30 @@ pub fn send_draft(context: &mut Context, account_cursor: usize, draft: Draft) ->
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if !failure {
|
|
|
|
if !failure {
|
|
|
|
context.replies.push_back(UIEvent::Notification(
|
|
|
|
let output = msmtp.wait().expect("Failed to wait on mailer");
|
|
|
|
Some("Sent.".into()),
|
|
|
|
if output.success() {
|
|
|
|
format!(
|
|
|
|
context
|
|
|
|
"Mailer output: {:#?}",
|
|
|
|
.replies
|
|
|
|
msmtp
|
|
|
|
.push_back(UIEvent::Notification(Some("Sent.".into()), String::new()));
|
|
|
|
.wait_with_output()
|
|
|
|
} else {
|
|
|
|
.expect("Failed to wait on filter")
|
|
|
|
if let Some(exit_code) = output.code() {
|
|
|
|
.stdout
|
|
|
|
log(
|
|
|
|
),
|
|
|
|
format!(
|
|
|
|
));
|
|
|
|
"Could not send e-mail using `{}`: Process exited with {}",
|
|
|
|
|
|
|
|
cmd, exit_code
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
ERROR,
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
log(
|
|
|
|
|
|
|
|
format!(
|
|
|
|
|
|
|
|
"Could not send e-mail using `{}`: Process was killed by signal",
|
|
|
|
|
|
|
|
cmd
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
ERROR,
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
!failure
|
|
|
|
!failure
|
|
|
|
}
|
|
|
|
}
|
|
|
|