Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

html in an email

4 views
Skip to first unread message

bill

unread,
Feb 15, 2021, 9:50:25 AM2/15/21
to
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.

I can just put the urls on the page but that is fairly messy. I
tried using the code for an anchor, but the full url is displayed
not just the part between <a...> and the </a>.

Any suggestions are appreciated.
-bill

Phillip Helbig (undress to reply)

unread,
Feb 15, 2021, 10:09:13 AM2/15/21
to
In article <s0e1nc$vh4$1...@gioia.aioe.org>, bill <wil...@TechServSys.com>
writes:

> 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.

If they know still know what the list ist, then they probably want to
stay on it. If they've forgotten, they might be hesitant to click on a
link embedded in an email, as that is used for various malicious
behaviour. Considering that it's a mailing list, wouldn't it make more
sense to subscribe and unsubscribe via email? Why not just put the
unsubscribe instructions as a footer at the bottom of each email sent to
the list? That could be a link, but then, being in a regular list
email, its purpose would be more obvious, or something like "send an
email with no body and subject UNSUBSCRIBE to f...@bar.invalid to
unsubscribe".

JJ

unread,
Feb 15, 2021, 11:20:49 AM2/15/21
to
Make sure the email client application can compose HTML email. If not, the
use others that can. If the application supports it, it should have a
feature to add links.

Volker Englisch

unread,
Feb 15, 2021, 11:58:08 AM2/15/21
to
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.
>
> I can just put the urls on the page but that is fairly messy. I
> tried using the code for an anchor, but the full url is displayed
> not just the part between <a...> and the </a>.

Usually it's not necessary to use html for that at all. Just put a line
like

http://myserver.example.com/mylink.html

or something like this into your mail. And add a description what the
link is for above or below that line.

bill

unread,
Feb 15, 2021, 12:08:55 PM2/15/21
to
Philip,
This is waiting list for a rescue Irish Wolfhound not a mailing list.
-bill

bill

unread,
Feb 15, 2021, 12:12:38 PM2/15/21
to
Yes, that works, but looks messy. OTOH, it is simple and easy.
-bill

Philip Herlihy

unread,
Feb 15, 2021, 1:44:56 PM2/15/21
to
In article <s0e1nc$vh4$1...@gioia.aioe.org>, wil...@TechServSys.com says...
I think it depends on what email client/editor you're using. In Outlook
(Office application Outlook) you simply select some text, right-click, pick
"Hyperlink..." and choose to "link to" an email address. Outlook (when in HTML
mode, of course) generates a correct mailto: link, hiding the URL (email
address) and displaying only the text you selected. Other editors may go about
it slightly differently, but the principle must be the same. However, enough
HTML emails arrive with a warning that "if the link doesn't work for you, then
copy and paste this humungous URL into your browser..." to suggest it's useful
to include the full URL anyway!

--

Phil, London

😉 Good Guy 😉

unread,
Feb 15, 2021, 2:08:00 PM2/15/21
to
On 15/02/2021 14:50, bill wrote:

I can just put the urls on the page but that is fairly messy.  I tried using the code for an anchor, but the full url is displayed not just the part between <a...> and the </a>.
Any suggestions are appreciated.
-bill

You must be doing something wrong. If you create a correct link then it should only show something like "Confirm your name on the waiting list" etc etc

How are you creating this link? Perhaps you can show us your page.

            
                This will show only this text.
            
        
[ Windows 10 Support ]


--

With over 1.2 billion devices now running Windows 10, customer satisfaction is higher than any previous version of windows.

Arno Welzel

unread,
Feb 15, 2021, 3:15:00 PM2/15/21
to
bill:

> 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.
>
> I can just put the urls on the page but that is fairly messy. I
> tried using the code for an anchor, but the full url is displayed
> not just the part between <a...> and the </a>.

Because the mail was not send as HTML. You need to create an HTML mail
to include links this way,


--
Arno Welzel
https://arnowelzel.de

Volker Englisch

unread,
Feb 15, 2021, 4:28:08 PM2/15/21
to
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.
>
> I can just put the urls on the page but that is fairly messy. I
> tried using the code for an anchor, but the full url is displayed
> not just the part between <a...> and the </a>.

Another approach:

<a href="http://somewhere.example.com/link.html">
Klick here to ...
</a>

But, as Arno mentioned, the mail has to be declared as text/html in the
*header*

Eli the Bearded

unread,
Feb 15, 2021, 5:44:34 PM2/15/21
to
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.

Randal L. Schwartz

unread,
Feb 16, 2021, 2:03:08 AM2/16/21
to
>>>>> "Arno" == Arno Welzel <use...@arnowelzel.de> writes:

Arno> Because the mail was not send as HTML. You need to create an HTML
Arno> mail to include links this way,

And then your mail goes right into my "very likely spam" folder, and
once a week, I sometimes paw through that if I'm bored.

If you send text/html, be sure you *also* send text/plain, and that the
two versions generally agree.

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<mer...@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Dart/Flutter consulting, Technical writing, Comedy, etc. etc.
Still trying to think of something clever for the fourth line of this .sig

bill

unread,
Feb 18, 2021, 10:33:57 AM2/18/21
to
Thanks to all who commented.
PHP has a function to send an email. By putting the necessary
headers into the email writing a html body is quite easy.
Writing a multipart/alternative body is not but plain html will
do all that I need at this point.
Thanks for the suggestions.
-bill
0 new messages