diff --git a/CHANGELOG.md b/CHANGELOG.md index 793222d..e314da5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- \Seen flag when moving a message +- `\Seen` flag when moving a message + +### Removed + +- `Content-Type` from templates [#146] ## [0.3.2] - 2021-05-08 @@ -271,3 +275,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [#138]: https://github.com/soywod/himalaya/issues/138 [#141]: https://github.com/soywod/himalaya/issues/141 [#144]: https://github.com/soywod/himalaya/issues/144 +[#146]: https://github.com/soywod/himalaya/issues/146 diff --git a/src/msg/model.rs b/src/msg/model.rs index 1ff3325..568b7e3 100644 --- a/src/msg/model.rs +++ b/src/msg/model.rs @@ -326,7 +326,7 @@ impl<'m> Msg<'m> { "7bit" => encoding = ContentTransferEncoding::SevenBit, "quoted-printable" => encoding = ContentTransferEncoding::QuotedPrintable, "base64" => encoding = ContentTransferEncoding::Base64, - _ => warn!("unsupported encoding, we use base64 for your message"), + _ => warn!("unsupported encoding, default to base64"), } msg } @@ -351,7 +351,7 @@ impl<'m> Msg<'m> { .map(|fname| fname.to_string_lossy()) .unwrap_or(Cow::from(Uuid::new_v4().to_string())); let attachment_content = fs::read(attachment) - .chain_err(|| format!("Cannot read attachment `{}`", attachment))?; + .chain_err(|| format!("Could not read attachment `{}`", attachment))?; let attachment_ctype = tree_magic::from_u8(&attachment_content); parts = parts.singlepart( @@ -540,10 +540,6 @@ impl<'m> Msg<'m> { Msg::build_tpl(config, account, msg_spec) } - fn add_content_headers(tpl: &mut Vec) { - tpl.push("Content-Type: text/plain; charset=utf-8".to_string()); - } - fn add_from_header(tpl: &mut Vec, from: Option) { tpl.push(format!("From: {}", from.unwrap_or_else(String::new))); } @@ -596,7 +592,6 @@ impl<'m> Msg<'m> { fn build_tpl(config: &Config, account: &Account, msg_spec: MsgSpec) -> Result { let mut tpl = vec![]; - Msg::add_content_headers(&mut tpl); Msg::add_from_header(&mut tpl, Some(config.address(account))); Msg::add_in_reply_to_header(&mut tpl, msg_spec.in_reply_to); Msg::add_cc_header(&mut tpl, msg_spec.cc); diff --git a/vim/ftplugin/himalaya-msg-read.vim b/vim/ftplugin/himalaya-msg-read.vim index 427ddf5..c140db1 100644 --- a/vim/ftplugin/himalaya-msg-read.vim +++ b/vim/ftplugin/himalaya-msg-read.vim @@ -1,5 +1,3 @@ -syntax on - setlocal bufhidden=wipe setlocal buftype=nofile setlocal cursorline diff --git a/vim/ftplugin/himalaya-msg-write.vim b/vim/ftplugin/himalaya-msg-write.vim index 9be611c..4f6da29 100644 --- a/vim/ftplugin/himalaya-msg-write.vim +++ b/vim/ftplugin/himalaya-msg-write.vim @@ -3,7 +3,6 @@ setlocal filetype=mail setlocal foldexpr=himalaya#shared#thread#fold(v:lnum) setlocal foldmethod=expr setlocal startofline -syntax on augroup himalaya_write autocmd! *