In comp.infosystems.www.authoring.html, Volker Englisch <
eh...@rrzli.de> wrote:
> bill <
wil...@techservsys.com> wrote:
>> I want to embed some links in an email. I am asking waiting list
>> individuals to tell my server that they are still interested in
>> staying on the waiting list.
...
> But, as Arno mentioned, the mail has to be declared as text/html in the
> *header*
comp.mail.misc or comp.mail.mime is where this is topical. Both are very
quiet, but there's apparently a lot of mail.misc traffic in
comp.mail.sendmail.
Setting the right headers is fairly simple to understand if you are
comfortable composing HTML by hand. Getting the tools to set headers
manually is trickier. I think most people are going to be using tools
that want to set the headers for them, and really becomes a matter of
knowing your tools and how to use them.
When _I_ want to compose HTML email, I compose a simple piece of HTML
then set headers like:
Mime-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
And then use mmencode to turn the plain HTML into quoted-printable HTML.
I'm probably one out of a million doing it that way however[*]. And in
all likelihood, I'd make it multipart/alternative with text/plain and
text/html parts, and that's a whole extra layer of encoding to create by
hand. Then if I wanted to include images, then it would be
multipart/related wrapping multipart/alternative, at which point a human
hand encoding it is very likely to start making errors.
There's rules about adding extra hyphens to the boundaries, rules
about what headers are expected, guidelines about ordering parts,
etc. Roughly it looks like this:
Mime-Version: 1.0
Content-Type: multipart/related; boundary="--related-part--"
----related-part--
Content-Type: multipart/alternative; boundary="--alternative-part--"
----alternative-part--
Content-Type: text/plain; charset="utf-8"
Hey! You! Click on the link.
https://www.example.com/
----alternative-part--
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
<html><head><title></title></head><body><div>Hey! You! Click =
on the link.</div><a href=3D="
https://www.example.com/"><img =
src=3D"cid:imageid" width=3D"200" height=3D"100" alt=3D"Image=
Link"></a></body></html>
----alternative-part----
----related-part--
Content-Type: image/jpeg; name="link.jpg"
Content-Disposition: inline; filename="link.jpg"
Content-Transfer-Encoding: base64
Content-ID: <imageid>
[base64 encoded JPEG here]
----related-part----
For myself, I wouldn't bother a bare link works well enough. But
sometimes I'm paid to do more.
Elijah
------
[*] This is odd even in rarified Internet corners where hand coding is common.