EMail Address Format

For technical support for all editions of CSS HTML Validator. Includes bug reports.
Post Reply
rayt435
Rank 0 - Newcomer
Rank 0 - Newcomer
Posts: 5
Joined: Tue Dec 10, 2013 9:37 am

EMail Address Format

Post by rayt435 » Mon Mar 24, 2014 2:30 pm

I format all the email addresses on my web pages in the following format:

Code: Select all

<a href="mailto:Bruce Dexxxx<bdexxxx@xxxx.edu>">Bruce Dexxxx</a>
I do this to get past overly aggressive spam filters at the universities and colleges. Placing the name in the address seems to help. The link works fine in the email client with the email sending properly. According to my research such a format is perfectly valid.

However, HTMLValidator version 14.0204 (standard) flags such email addresses as being invalid with the following message.
The email address or addresses specified in the mailto link "mailto:Bruce Dexxxx<bdexxxx@xxxx.edu>" did not pass a syntax check. Ensure that all email addresses specified are correct and contain valid top-level domains. Details: "Bruce Dexxxx<bdexxxx@xxxx.edu>" contains one or more invalid characters
.

Is the email address truly invalid (which my research and experience indicates otherwise)? Or is there a problem in the email address validation code?

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3453
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: EMail Address Format

Post by Albert Wiersch » Mon Mar 24, 2014 3:18 pm

Hello,

Technically, I don't think it's valid.

I didn't see that format here:
http://www.ietf.org/rfc/rfc6068.txt

Do you know of an "official" source that says that email address format with the display name and angle brackets is allowed?

You can turn email address syntax checking off in the Options->Validator Engine Options->Options -> Link Checking page, but you may want to make sure that the format you are using works in all possible cases where people might want to use the link to send an email.
Image
Albert Wiersch

User avatar
Lou
Rank V - Professional
Rank V - Professional
Posts: 282
Joined: Fri Jul 29, 2005 5:55 pm
Location: CO
Contact:

Re: EMail Address Format

Post by Lou » Mon Mar 24, 2014 7:45 pm

Reading specifications is not my "natural language" but I thing I found something relevent

RFC 5322 Internet Message Format October 2008
3.4. Address Specification wrote:Normally, a mailbox is composed of two parts: (1) an optional display
name that indicates the name of the recipient (which can be a person
or a system) that could be displayed to the user of a mail
application, and (2) an addr-spec address enclosed in angle brackets

("<" and ">"). There is an alternate simple form of a mailbox where
the addr-spec address appears alone, without the recipient's name or
the angle brackets. The Internet addr-spec address is described in
section 3.4.1.
That said, there may be a difference between addressing of an "Internet Message" and the format allowed as part of a mailto
Lou
Say what you will about Sisyphus. He always has work.

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3453
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: EMail Address Format

Post by Albert Wiersch » Tue Mar 25, 2014 8:21 am

Lou wrote:That said, there may be a difference between addressing of an "Internet Message" and the format allowed as part of a mailto
Yes, I think that's it. It's not a mailto format as far as I can tell.

I searched https://tools.ietf.org/html/rfc5322 for "mailto" and nothing came up. If you look at this example:
https://tools.ietf.org/html/rfc5322#appendix-A.1.1

It contains:

Code: Select all

From: John Doe <jdoe@machine.example>
To: Mary Smith <mary@example.net>
But the above format is not for mailto's.
Image
Albert Wiersch

User avatar
Lou
Rank V - Professional
Rank V - Professional
Posts: 282
Joined: Fri Jul 29, 2005 5:55 pm
Location: CO
Contact:

Re: EMail Address Format

Post by Lou » Tue Mar 25, 2014 10:17 am

Yes Albert, that is the way I read it too.

Back in the dark ages when the HTML mailto construct for a URI was defined (I'm guessing as an added feature) there were not as many concerns about spam, thus the problem from the OP.

Though technically an error, it sounds like rayt435 has found that (most) clients interfacing with a mail app process the optional format,

Code: Select all

 Mary Smith <mary@example.net>
well enough. Guess the choice is 'spam trap' or 'technical error.' Not a problem as long as you know the pros and cons of both.

I have a twinge because of the error and the lose of elegance.
Lou
Say what you will about Sisyphus. He always has work.

rayt435
Rank 0 - Newcomer
Rank 0 - Newcomer
Posts: 5
Joined: Tue Dec 10, 2013 9:37 am

Re: EMail Address Format

Post by rayt435 » Tue Mar 25, 2014 11:26 am

Albert Wiersch wrote:Hello,

Technically, I don't think it's valid.

I didn't see that format here:
http://www.ietf.org/rfc/rfc6068.txt

Do you know of an "official" source that says that email address format with the display name and angle brackets is allowed?

You can turn email address syntax checking off in the Options->Validator Engine Options->Options -> Link Checking page, but you may want to make sure that the format you are using works in all possible cases where people might want to use the link to send an email.
I have yet to find an instance where using the brackets DOES NOT work. Since our applications are primarily targeted at college and university students spam filters have always been a problem. One solution that was suggested to me was to put the email address in brackets with the name in front. I don't remember who suggested that change but it seems to have helped. I did google searches and found several references to doing email addresses in that format.

I know of no "official source" for the format but it does indeed seem to work well. We send emails from our servers using the format and links on web pages use the format with the brackets. More email is getting through using the bracketed format so I am going to continue using the format.

Thanks for responding.

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3453
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: EMail Address Format

Post by Albert Wiersch » Tue Mar 25, 2014 2:05 pm

rayt435 wrote:I have yet to find an instance where using the brackets DOES NOT work. Since our applications are primarily targeted at college and university students spam filters have always been a problem. One solution that was suggested to me was to put the email address in brackets with the name in front. I don't remember who suggested that change but it seems to have helped. I did google searches and found several references to doing email addresses in that format.

I know of no "official source" for the format but it does indeed seem to work well. We send emails from our servers using the format and links on web pages use the format with the brackets. More email is getting through using the bracketed format so I am going to continue using the format.

Thanks for responding.
Thanks for the feedback. I'll consider accepting this format in a future update, perhaps with a message or warning that it's not technically valid but still works in many cases, or something of the like.

In the meantime, you may want to ignore the message or change it to a regular message from an error, or just disable email address syntax checking altogether.
Image
Albert Wiersch

Post Reply