* multipart/related; not multipart/mixed; RFC 2387; html, embedded png
@ 2012-04-10 15:53 Uwe Brauer
2012-04-10 18:41 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 4+ messages in thread
From: Uwe Brauer @ 2012-04-10 15:53 UTC (permalink / raw)
To: ding
[-- Attachment #1: Type: text/plain, Size: 787 bytes --]
Hello
2 weeks ago I wrote about org-mime-htmlize, which html
emails and converts latex formula to embedded png.
I attach the corresponding htmlized message below.
The resulting mail is displayed in a couple of email
The reason is that the message contains the line
Content-type: multipart/mixed; boundary="=-=-="
in its header while thunderbird requires
Content-type: multipart/related; boundary="=-=-="
and the thunderbird developers insist that this is the
RFC 2387 standard.
Could gnus offer this possibility or maybe it is already
there and I miss the relevant setting?
Thanks
Uwe Brauer
- test-org-msg (org-mime-htmlized msg)
- test-org-mime.eml how the file is send.
- Test-org-mime-related.eml how it is displayed
correctly in thunderbird
[-- Attachment #2: test-org-msg --]
[-- Type: application/octet-stream, Size: 1111 bytes --]
To: Uwe Brauer <oub@mat.ucm.es>
Subject: test-org-mime
Gcc: nnml+archive:sent-mail
From: Uwe Brauer <oub@mat.ucm.es>
Reply-To: Uwe Brauer <oub@mat.ucm.es>
Date: Tue, 10 Apr 2012 17:36:53 +0200
--text follows this line--
<#multipart type=alternative><#part type=text/plain>We consider the integral
$$\int f dx=0$$
And then the sum
$$\sum_{k=0}\alpha_k=0$$
<#part type=text/html>
<p>We consider the integral <br/>
</p>
<p><br/>
<img src="cid:_tmp_ltxpng_org-8SH5xR_ddcd1a28ae01cc015cde991ee07aa813f58e9a0c.png" alt="$$\int f dx=0$$"/> <br/>
</p>
<p><br/>
And then the sum<br/>
</p>
<p><br/>
<img src="cid:_tmp_ltxpng_org-8SH5xR_27f2dea86a6a697058fcb24ce04f30a26e5643d2.png" alt="$$\sum_{k=0}\alpha_k=0$$"/><br/>
</p><#/multipart>
<#part type="image/png" filename="/tmp/ltxpng/org-8SH5xR_27f2dea86a6a697058fcb24ce04f30a26e5643d2.png" id="<_tmp_ltxpng_org-8SH5xR_27f2dea86a6a697058fcb24ce04f30a26e5643d2.png>">
<#/part>
<#part type="image/png" filename="/tmp/ltxpng/org-8SH5xR_ddcd1a28ae01cc015cde991ee07aa813f58e9a0c.png" id="<_tmp_ltxpng_org-8SH5xR_ddcd1a28ae01cc015cde991ee07aa813f58e9a0c.png>">
<#/part>
[-- Attachment #3: test-org-mime.eml --]
[-- Type: message/rfc822, Size: 4932 bytes --]
[-- Attachment #3.1.1.1: Type: text/plain, Size: 88 bytes --]
We consider the integral
$$\int f dx=0$$
And then the sum
$$\sum_{k=0}\alpha_k=0$$
[-- Attachment #3.1.1.2: Type: text/html, Size: 336 bytes --]
[-- Attachment #3.1.2: org-8SH5xR_27f2dea86a6a697058fcb24ce04f30a26e5643d2.png --]
[-- Type: image/png, Size: 447 bytes --]
[-- Attachment #3.1.3: org-8SH5xR_ddcd1a28ae01cc015cde991ee07aa813f58e9a0c.png --]
[-- Type: image/png, Size: 450 bytes --]
[-- Attachment #4: test-org-mime-related.eml --]
[-- Type: message/rfc822, Size: 4934 bytes --]
[-- Attachment #4.1.1.1: Type: text/plain, Size: 88 bytes --]
We consider the integral
$$\int f dx=0$$
And then the sum
$$\sum_{k=0}\alpha_k=0$$
[-- Attachment #4.1.1.2: Type: text/html, Size: 336 bytes --]
[-- Attachment #4.1.2: org-8SH5xR_27f2dea86a6a697058fcb24ce04f30a26e5643d2.png --]
[-- Type: image/png, Size: 447 bytes --]
[-- Attachment #4.1.3: org-8SH5xR_ddcd1a28ae01cc015cde991ee07aa813f58e9a0c.png --]
[-- Type: image/png, Size: 450 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: multipart/related; not multipart/mixed; RFC 2387; html, embedded png
2012-04-10 15:53 multipart/related; not multipart/mixed; RFC 2387; html, embedded png Uwe Brauer
@ 2012-04-10 18:41 ` Lars Magne Ingebrigtsen
2012-04-10 19:55 ` Uwe Brauer
0 siblings, 1 reply; 4+ messages in thread
From: Lars Magne Ingebrigtsen @ 2012-04-10 18:41 UTC (permalink / raw)
To: Uwe Brauer; +Cc: ding
Uwe Brauer <oub@mat.ucm.es> writes:
> 2 weeks ago I wrote about org-mime-htmlize, which html
> emails and converts latex formula to embedded png.
> I attach the corresponding htmlized message below.
>
> The resulting mail is displayed in a couple of email
> The reason is that the message contains the line
> Content-type: multipart/mixed; boundary="=-=-="
> in its header while thunderbird requires
> Content-type: multipart/related; boundary="=-=-="
> and the thunderbird developers insist that this is the
> RFC 2387 standard.
If it's an HTML message that includes an image, then multipart/related
is correct.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: multipart/related; not multipart/mixed; RFC 2387; html, embedded png
2012-04-10 18:41 ` Lars Magne Ingebrigtsen
@ 2012-04-10 19:55 ` Uwe Brauer
2012-04-10 22:36 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 4+ messages in thread
From: Uwe Brauer @ 2012-04-10 19:55 UTC (permalink / raw)
To: Lars Magne Ingebrigtsen; +Cc: ding
>> On Tue, 10 Apr 2012 20:41:28 +0200, Lars Magne Ingebrigtsen <larsi@gnus.org> wrote:
> Uwe Brauer <oub@mat.ucm.es> writes:
> If it's an HTML message that includes an image, then multipart/related
> is correct.
Well fine, but my point is: gnus does *not* do the correct
thing!!!
It inserts
Content-type: multipart/mixed; boundary="=-=-="
in the header, so this seems a bug or, at least, a missing feature.
The only way I solved this issue was to change
(defun mml-generate-mime ()
"Generate a MIME message based on the current MML document."
(let ((cont (mml-parse))
(mml-multipart-number mml-multipart-number))
(if (not cont)
nil
(mm-with-multibyte-buffer
(if (and (consp (car cont))
(= (length cont) 1))
(mml-generate-mime-1 (car cont))
; (mml-generate-mime-1 (nconc (list 'multipart '(type . "mixed"))
(mml-generate-mime-1 (nconc (list 'multipart '(type . "related"))
cont)))
(buffer-string)))))
But that seems to me a very ugly solution and besides it
might cause some inconvenience which I am not aware of. I
don't understand the structure of mml, so I don't know what
really to suggest.
I would introduce a new variable
mml-mime-use-related
and wrap into the mml-generate-mime function.
Then I would modify the org-mime-htmlize function such that
it sets mml-mime-use-related to t, and finally I would
insert a function into the send hook which would reset the
variable again to nil.
I presume there are much more elegant solutions.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: multipart/related; not multipart/mixed; RFC 2387; html, embedded png
2012-04-10 19:55 ` Uwe Brauer
@ 2012-04-10 22:36 ` Lars Magne Ingebrigtsen
0 siblings, 0 replies; 4+ messages in thread
From: Lars Magne Ingebrigtsen @ 2012-04-10 22:36 UTC (permalink / raw)
To: Uwe Brauer; +Cc: ding
Uwe Brauer <oub@mat.ucm.es> writes:
> The only way I solved this issue was to change
>
> (defun mml-generate-mime ()
I've now added an optional MULTIPART-TYPE option to this function that
can be used when making the MIME to Ma Gnus.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-04-10 22:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-10 15:53 multipart/related; not multipart/mixed; RFC 2387; html, embedded png Uwe Brauer
2012-04-10 18:41 ` Lars Magne Ingebrigtsen
2012-04-10 19:55 ` Uwe Brauer
2012-04-10 22:36 ` Lars Magne Ingebrigtsen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).