Unless you are trying to answer an non-HTML email but in that case the org-msg-edit-mode should not even enable itself. Otherwise, we are left with:
the original email is malformed
there is a bug in org-msg-save-article-for-reply-mu4e or the error management is not strong enough (which is certainly the case but I am not the original author of this function).
If this #2, please share send me the file by email so that I can try to fix this function.
FYI, I use the gnus backend ⇒ I don't exercise the mu4e myself but many people around the world are using it.
It looks like an invalid html content to me. I don't even see the html or body tag. Also it looks like base64 encorded mime content. The file extracted by mu4e should not have fields like Content-Type:. It should be the de-encoded html content.
ah.. I see my mistake. I should it better. The mime part above is from the original mail:
------------=_1574156543-7237-6
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: utf-8
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf-8">Ko=
mmentar zu <a href=3D"*snip*">Ti=
cket 34708</a>:<br><br>
*snip* some text with <br> tags
------------=_1574156543-7237-6--
'org-msg-save-article-for-reply-mu4e' save that to /tmp/messageid :
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf-8">Kommentar zu <a href=3D"*snip*">Ticket 34708</a>:<br><br>
*snip* some text with <br> tags
Maybe there is any workaround possible? Because that are automated Mails, where I have to reply to :/
Maybe 'org-msg-save-article-for-reply-mu4e' recognize the missing the
Of course, this is possible. I pushed two experimental patches on the experimental branch to handle this situation. Could you test them ? And also review them ?
Take your time, try to validate with as many use-cases as possible, we are not in a hurry. Come back to me sometime next week with your feedback. If you do not find any issue, I will push experimental as the new master.
mail-agent mu4e emacs 26.3 spacemacs developer distribution
Message could not send or preview, if the original reply message does not contain a "
error message is:
backtrace:
If the file /tmp/rt-4.0.8-7237 does not include a "
not working:
working:
The problem is that sometimes I reply need to message which does not have a
Hi,
The
<div>...</div>
should be present because:gnus
mail user agent this is added by thegnus-article-browse-html-article
with
mu4e
Mail User Agent, theorg-msg-save-article-for-reply-mu4e
function should have added the<div>...</div>
(see below).326 (defun org-msg-save-article-for-reply-mu4e () 327 "Export the currently visited mu4e article as HTML." 328 (with-current-buffer mu4e~view-buffer-name 329 (let ((msg (mu4e-message-at-point)) 330 (html (mu4e-message-field msg :body-html)) 331 (file (concat "/tmp/" (mu4e-message-field msg :message-id)))) 332 (cl-flet ((mails2str (l) 333 (mapconcat (lambda (m) 334 (format "%S <%s>" (car m) (cdr m))) 335 l ", ")) 336 (field2str (f) 337 (let ((value (funcall (cdr f) 338 (mu4e-message-field msg (car f))))) 339 (when value 340 (format "%s: %s
\n" 341 (capitalize (substring (symbol-name (car f)) 1)) 342 value))))) 343 (with-temp-buffer 344 (save-excursion 345 (insert html)) 346 ;; Remove everything before html tag 347 (save-excursion 348 (when (re-search-forward "^<html\(.?\)>" nil t) 349 (delete-region (point-min) (match-beginning 0)))) 350 ;; Insert reply header after body tag 351 (when (re-search-forward "<body\(.?\)>" nil t) 352 (goto-char (match-end 0)) 353 (insert "<div align=\"left\">\n" 354 (mapconcat #'field2str 355 `((:from . ,#'mails2str) 356 (:subject . identity) 357 (:to . ,#'mails2str) 358 (:cc . ,#'mails2str) 359 (:date . message-make-date)) 360 "") 361 "
\n")) 362 (write-file file)) 363 (list file)))))
Unless you are trying to answer an non-HTML email but in that case the
org-msg-edit-mode
should not even enable itself. Otherwise, we are left with:org-msg-save-article-for-reply-mu4e
or the error management is not strong enough (which is certainly the case but I am not the original author of this function).If this #2, please share send me the file by email so that I can try to fix this function.
FYI, I use the
gnus
backend ⇒ I don't exercise themu4e
myself but many people around the world are using it.Regards,
-- Jeremy
One Emacs to rule them all
Hi, thanks for the fast response. The original message is generated from a ticket system (Request Tracker). The mime part with html is this:
org-msg saves the reply file in /tmp like above - without any
I receive a lot oh html mails from ticket-systems where only a html-part is included - without or
tags. Maybe org-msg does have a workaround for that?regards
Hi,
It looks like an invalid html content to me. I don't even see the html or body tag. Also it looks like base64 encorded mime content. The file extracted by mu4e should not have fields like
Content-Type:
. It should be the de-encoded html content.Regards, Jeremy
hi,
ah.. I see my mistake. I should it better. The mime part above is from the original mail:
'org-msg-save-article-for-reply-mu4e' save that to /tmp/messageid :
Maybe there is any workaround possible? Because that are automated Mails, where I have to reply to :/ Maybe 'org-msg-save-article-for-reply-mu4e' recognize the missing the
-tag and insert it?regards
Hi Gyhor,
Of course, this is possible. I pushed two experimental patches on the experimental branch to handle this situation. Could you test them ? And also review them ?
Regards,
Jeremy
One Emacs to rule them all
Hi Jeremy, the firsts tests are positive. Everything is working fine. I will try more the next days. thank you for your fast response and help!
regards
Hi Gyhor,
Take your time, try to validate with as many use-cases as possible, we are not in a hurry. Come back to me sometime next week with your feedback. If you do not find any issue, I will push experimental as the new master.
Regards, Jeremy
Is it stable enough ?
I assume that it works now. I have pushed the experimental branch as the new master branch.
thank you!