Is an e-mail address a URI?
Asked Answered
B

7

26

I've tried to figure out whether the format of an e-mail address can be said to comply with the definition of a URI or not, but I've found no explicit confirmation of this so far. I hope someone can provide me with some insight here. Thanks in advance :)

Bunkum answered 2/2, 2010 at 14:31 Comment(0)
S
40

Yes, but with "mailto:" prefix.

A URI has this form:

<scheme>:<scheme-specific-part>

The <scheme> is "mailto", the <scheme-specific-part> is the address.

For example:

mailto:[email protected]

is a valid URI.

Speechless answered 2/2, 2010 at 14:36 Comment(1)
So, without the mailto: scheme, an email address cannot be considered a URI?Inherit
H
18

Per RFC 3986:

A Uniform Resource Identifier (URI) is a compact sequence of characters that identifies an abstract or physical resource.

The basic syntax components as defined by the RFC:

The generic URI syntax consists of a hierarchical sequence of
components referred to as the scheme, authority, path, query, and
fragment.

  URI         = scheme ":" hier-part [ "?" query ] [ "#" fragment ]

  hier-part   = "//" authority path-abempty
              / path-absolute
              / path-rootless
              / path-empty

So - an e-mail address is not a URI. However mailto:[email protected] is a valid URI.

Houselights answered 2/2, 2010 at 14:37 Comment(0)
A
5

An e-mail address on it's own - [email protected] - I'd say no. A link to an e-mail address - mailto:[email protected] - I'd say yes.

Apportion answered 2/2, 2010 at 14:36 Comment(2)
A URI doesn't need to include the scheme part (mailto) to be valid.Pashto
@Massimo Fazzolari - yes, you are correct - I was mistaken - the ABNF for RFC 3986 requires a scheme.Pashto
R
2

yes when used with "mailto" scheme, look here: http://www.ietf.org/rfc/rfc2396.txt

1.3. Example URI

The following examples illustrate URI that are in common use.

mailto:[email protected]
-- mailto scheme for electronic mail addresses

Ruminate answered 2/2, 2010 at 14:34 Comment(5)
section 1.3 of the rfc has an email exampleRowen
but only with the "mailto" qualifier. Think of it this way, HREF's takes URIs.Selfaggrandizement
@Stephen Wrighton - a URI doesn't need to include the scheme part (mailto) to be valid.Pashto
@McDowell: Cite? RFC 3986 appears to disagree.Dodecagon
@Andrew Aylett - yes, you are correct - I was mistaken - the ABNF clearly requires a scheme.Pashto
O
2

If all URL's are URI's then all [email protected] address are URIs because they are URLs

So I think an email address is a URI, if it has mailto: in front of it.

https://www.rfc-editor.org/rfc/rfc2368 https://www.rfc-editor.org/rfc/rfc1738

Obloquy answered 2/2, 2010 at 14:38 Comment(0)
G
1

I think it is, if it includes the "mailto:" schema reference in the address; otherwise not. But as it is only seen at html pages, in the most of cases the email address it self could not be considered a URI.

If you haven't checked before, take a look at RFC3305 document.

The official register of URI scheme names is maintained by IANA at http://www.iana.org/assignments/uri-schemes.html

I hope it helps, Carlos.

Gamp answered 2/2, 2010 at 14:38 Comment(0)
C
0

An email address like [email protected] is not a URI in the same sense that a web address like www.google.com is "not" a URI.

By adding the scheme "mailto:", the email address becomes a valid URL: mailto:[email protected]. (Note: a URL is a type of URI).

By adding the scheme "https:", the web address becomes a valid URL: https://www.google.com (note the file-path syntax for resources on a web server and the "//" to prefix the name of the server is a convention that predates the URI definition).

So technically an email address on its own is not a URI any more than www.google.com is a URI, but for all reasonable intents and purposes we know what URL is being referred to in either case: human beings can easily work out what URL is being referred to, and a lot of software (web browsers, etc) are programmed to automatically interpret web addresses and email addresses as URLs even when you leave out the scheme.

Coccyx answered 27/4, 2024 at 15:56 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.