Is there a web-standards method of suppressing mailto: linkification? - hyperlink

When Gmail opens a message containing a bare email address that does not have mailto: link, it "helpfully" turns it into a mailto: link, there is unwanted change of the text styling too.
Is there a web standards tag that authors (such as email newsletter operators) can use to suppress linkification? On Googling, I see some mention of this idea, <nolink></nolink> and <span class="nolink"></span>. But I could not find any authoritative page saying that this is what I should use.

There are solutions like:
My my mail is <a>myname#example.com</a>
Or
My my mail is myname<span>#</span>example<span>.</span>com
But both are tricks, no standards.

Related

WCAG 2.0 guidelines mailto link text

I'm trying to find guidance from WCAG guidelines about link text in an anchor with a mailto:email address. Can the link-text be the persons name or is it advisable to have the link-text be the email address?
John Doe
versus
johndoe#emailaddress.com
Both are correct, depending on the context.
The Link Purpose (Link Only) guideline states that :
A mechanism is available to allow the purpose of each link to be identified from link text alone, except where the purpose of the link would be ambiguous to users in general. (Level AAA)
So when using a mailto: URI scheme, you should indicate the purpose of the action within the link. The purpose should be something like "Write an e-mail to John Doe", but you should not forget that the e-mail address itself might be important content which you want to give to your visitors for later use.
For instance, the following links are both correct according to the WCAG.
If you want to insist more on the action than the e-mail address:
Send feedback to our company
or if you just want to give your e-mail address to your visitors:
Contact me: John Doe, 10 downing street, London,
E-mail: johndoe#example.com

Why is a number in my link text appearing as *************** (stars)?

I have posted this as, although I worked out the answer, I could not find anything about it in a Google/stackoverflow search. I hope it might help someone in the future.
My C# MVC app generates a link and emails it to the user. In the email the html is simply a link tag with the url used as the href and the link text.
In the email in Outlook the link displays as below:
http://mydomain.com/Foo/Bar?id=6***************
When you hover over the link it shows as
http://mydomain.com/Foo/Bar?id=6523054102058710
The numbers should always show, otherwise the user may be suspicious.
It turns out that the number I was generating was 16 digits, inadvertently the same as a credit/debit card number. This meant that some email clients were hiding the number to protect privacy.
To solve the problem I simply changed the number of digits.

Using Gmail message source, generate direct link

So using the gmail message source is it possible to generate, a link to the message/thread in GMail's own interface?
on http://productforums.google.com/forum/#!topic/gmail/goChl1gG0NQ they use the following
https://mail.google.com/mail/#all/<HexEncodeMessageID>
Is this related to the Message=ID header found in the mail's source?
Message-ID: <SomeID#SomeID.mail>
The discussion Find Gmail url-IDs via IMAP seems to only give IMAP based solutions.
Update
This bookmarklet no longer works. See Benjamin Ziepert's update.
Original Answer
I decided to make a bookmarklet to help automate this.
javascript:window.location="https://gmail.com/#search/rfc822msgid:"+encodeURIComponent(window.document.body.innerHTML.match(/Message-ID: <(.*)>/i)[1])+"/"+encodeURIComponent(window.location.search.toString().slice(1).split('&').filter(function(x){return x.slice(0,3) == "th="})[0].slice(3));
Save this link on your bookmarks bar.
To get a direct link to a message, choose "Show original" on the dropdown for that message, and then click the bookmarklet on the new page that opens.
If anyone has suggestions for a clean way to do this without having to click show original, I'm all ears.
The "HexEncodeMessageID" that you refer to (and that occurs in links such as https://mail.google.com/mail/#inbox/14197d2548c9da1a) is unfortunately different from the RFC822 message ID (which occurs in the source of the email).
I do not know of any way to get a direct link to an email using the RFC822 message ID, but it is possible to search for a particular RFC822 message ID in Gmail (see GMail doc):
in:anywhere rfc822msgid:SomeID#SomeID.mail
You can turn this into a link:
https://mail.google.com/mail/#search/in%3Aanywhere+rfc822msgid%3ASomeID#SomeID.mail
(Don't forget that the message id should be URL-encoded. You can also just type the search in your GMail and copy the resulting URL afterwards.)
The problem with this link is that it does not send you to the mail directly, but to a search result page with a single hit. But this might be good enough for some applications.
The advantage is: The RFC822 is the same in your account and in the account of the sender. So if you want to refer to a given email in an email/chat, you can provide this search link (assuming the recipient also uses GMail). With the "HexEncodeMessageID" this would not work, because it is different in every account (according to my own experiments).
One last thing: the link only works when you are already logged in.
Here's an updated bookmarklet over what Benjamin Ziepert suggested. Basically with removed /u/0 part to make it a little more account-independent.
javascript:window.open("https://mail.google.com/mail/#search/rfc822msgid%3A" + encodeURIComponent(document.getElementsByClassName('message_id')[0].innerHTML.slice(4, -4)), "_self");
Usage: Save this link on your bookmarks bar. To get a direct link to a message, choose "Show original" on the dropdown for that message, and then click the bookmarklet on the new page that opens.

BlackBerry - intercept text in HTML

I would like to be able to intercept a hyperlink from an email on BlackBerry.
e.g.
dummy site
I have been able to intercept and identify text in a plain text email using PatternRepository. However, it doesn't seem to work with HTML emails - is this even possible?
I would like to avoid the solution of scanning every incoming email myself, and parsing all the text, but this might be the only option.
Thanks
This is not possible (up to and including BlackBerry 6 afaik). It is not related to the hyperlink concept - it is not possible to use PatternRepository with any type of text within HTML text.
For performance reasons, the BlackBerry designers decided not to implement pattern matching within HTML fields (browser, or email). This is very unfortunate, but it must be dealt with.
In my app, I had the freedom to define the contents of the email. In my case, I ended up including the pattern into the subject of the email - the user can click on the subject to get to my app.
In most other situations, I think the best/only way forward is to intercept each mail as it arrives and parse it looking for the text. If I have to do that in the future, I'll try to update this post with some sample code.
There are various posts on the BlackBerry forums about this issue.
Richard

link to an email attachment

Hi I am sending email attachments (using php) and would like to point out to the people that I send the emails to that there are attachments.
I want to do this by displaying a link in the html body of the email, so all they need to do is click the link and there system will try and open/view the attachment.
Does anyone know if this is this possible?
and if so any pointers/nudges in the right direction would be appreciated.
This will not work and it's a security concern, especially since links can be disguised and attachments can be dirty.
Add a big bold title with emphasis on the attachment, most users know how to download these from their (favorite) client.

Resources