I'm at a bit of a loss here. I need to generate a mail that has:
text part
html part
The html part needs to reference two other image parts by cid.
That's no problem, but I get a mail that is multipart/altnerative with
four parts
text
html
img1
img2
This displays fine in many clients and works as expected. In
thunderbird and various mac mail versions, it doesn't work correctly
as they're interpretting the standard more correctly (I think). They
basically do: Hey, img2 is something I can display and it's the
highest quality alternative so I'll show it and nothing else.
What I need to generate is something like:
http://people.dsv.su.se/~jpalme/ietf/mhtml-test/mhtml-12.txt
It's "multipart/related; multipart/alternative" which allows providing
the text/plain fallback and an html part that references attached
images.
Is this doable with ruby mail? I'm not seeing how I can accomplish
this. Help is greatly appreciated.
Thanks
-Ben
--
---------------------------------------------------------------------------------------------------------------------------
Ben Walton <bdwa...@gmail.com>
The impact of human uniqueness upon the world
has been enormous because it has established a new kind of evolution
to support the transmission across generations of learned knowledge
and behaviour."
-Stephen Jay Gould
---------------------------------------------------------------------------------------------------------------------------
I'm not sure if this is the best method or not, but I've solved this by doing:
1. generate a mail with text/plain and text/html parts, content type
multipart/alternative
2. generate a second mail where i add the encoded body of the first,
attach the referenced files and forcibly set the content type.
Seems to work...