fix multi-line subject encoding and introduce MIME debugging env var

This commit is contained in:
holger krekel
2019-12-05 10:13:14 +01:00
parent c4de0f3b17
commit ec81d29580
8 changed files with 61 additions and 6 deletions

View File

@@ -192,6 +192,10 @@ impl Job {
// was sent we need to mark it in the database ASAP as we
// otherwise might send it twice.
let mut smtp = context.smtp.lock().unwrap();
if std::env::var(crate::DCC_MIME_DEBUG).is_ok() {
info!(context, "smtp-sending out mime message:");
println!("{}", String::from_utf8_lossy(&body));
}
match smtp.send(context, recipients_list, body, self.job_id) {
Err(crate::smtp::send::Error::SendError(err)) => {
// Remote error, retry later.