TB deletes ?subject= from mailto: link

User Help for Mozilla Thunderbird
Post Reply
dlreich
Posts: 7
Joined: February 14th, 2005, 9:42 pm

TB deletes ?subject= from mailto: link

Post by dlreich »

TB will automatically generate a mailto: link for the text of a properly formed email address in the body of an outgoing email. However, if, before the email is sent, a "?subject=text" parameter is manually added to that link, TB will delete the parameter before sending the outgoing email.

If a mailto: link, including a "?subject=text" parameter, is manually added to non-email-address text in the outgoing email, TB will allow the link to remain as written when sending the email.

Why does TB not allow the proper modification of a mailto: link on email-address text?
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: TB deletes ?subject= from mailto: link

Post by tanstaafl »

Thunderbird doesn't do anything to a fully formed email address that I enter in the body of a HTML message. What else did you do to "automatically generate" the mailto: link?
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: TB deletes ?subject= from mailto: link

Post by tanstaafl »

Moved from Thunderbird Features to Thunderbird Support
dlreich
Posts: 7
Joined: February 14th, 2005, 9:42 pm

Re: TB deletes ?subject= from mailto: link

Post by dlreich »

I neglected to mention that the email contains an image so it is sent in HTML, not in plain text. Try this test. Create an email with the following text: "Text including an email address: someone@gmail.com. Before sending the email, select the words "email address" then Insert-Link and enter "mailto:someone@gmail.com?subject=appropriate-text" in the Link field. Now, back in the body of the email, select the text "someone@gmail.com" then Insert-Link and enter "mailto:someone@gmail.com?subject=appropriate-text" in the Link field. (i.e. add the same link to both pieces of text.)

Now send the email and then open the email in the Sent folder. If I click "email address", a new email opens with the Subject line "appropriate-text" but if I click "someone@gmail.com", a new email opens with a blank subject line.

Below is the HTML from View-Message Source. Why is "<a class="moz-txt-link-abbreviated" href="mailto:someone@gmail.com">" inserted in the href parameter?

<html>
<head>

<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Text including an <a
href="mailto:someone@gmail.com?subject=appropriate-text">email
address</a>: <a
href="mailto:someone@gmail.com?subject=appropriate-text"><a class="moz-txt-link-abbreviated" href="mailto:someone@gmail.com">someone@gmail.com</a></a><br>
</body>
</html>
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: TB deletes ?subject= from mailto: link

Post by tanstaafl »

I'm not surprised that it didn't do exactly what you wanted as you're inserting a link using Insert -> Link into something that it had automatically linkified. That's an edge case that I doubt whoever designed the HTML editor several decades ago worried about. If you want to edit an existing link I suggest you select the contents of the message body and then edit the link using Insert->HTML. See http://kb.mozillazine.org/Links_generated_automatically for how to suppress automatically generated links.

There have been several attempts to replace the built-in HTML editor. The last one I'm aware of failed because the widget they chose was too hard to integrate into Thunderbird. There was discussion about trying again using a different widget but given the limited resources I suspect it won't actually get replaced until Thunderbird is converted into an application written using just HTML5 and JavaScript a couple of years from now (to deal with Mozilla changes in directions). See the discussion about Thunderbird's future in viewtopic.php?f=28&t=2976617 for more information.
dlreich
Posts: 7
Joined: February 14th, 2005, 9:42 pm

Re: TB deletes ?subject= from mailto: link

Post by dlreich »

Thanks for the suggestions and the references. However, when I was creating the test email, TB had not yet "automatically linkified" the "someone@gmail.com". According to your reference, "Thunderbird linkifies HTML when you send or save the message." I had not done either when I used Insert-Link. In fact, just saving the new email does not produce the link. I found I had to save the email, close it, and then reopen it from the Drafts folder to see the link included. Here's the HTML that is generated: <a class="moz-txt-link-abbreviated" href="mailto:someone@gmail.com">someone@gmail.com</a>.

Here are the instructions in your reference for suppressing automatically-generated links:

When you write an HTML message, you can suppress automatically-generated links. Select the text that Thunderbird normally linkifies. Choose Insert – HTML... In the HTML editor, type anchor tags around the text. For example, if you type this but you do not want Thunderbird to linkify it:
someone@example.org
In the HTML editor, change it to:
<a>someone@example.org</a>
If there is already an anchor tag with attributes (class and href, typically), then remove the attributes to leave the tag looking like the example above.

They don't work. The automated link is back after I save, close, and reopen the email. My only solution, at this time, is to exclude the email address from the text and manually linkify some text such as "reply to" with the full mailto: plus ?subject=text using Insert-Link. TB doesn't modify that.

Any other thoughts? Should this be reported as a bug?
Post Reply