Template:Email/doc

From USApedia

The {{email}} template creates a link to an email address, showing either the e-mail address itself or replacement text (typically the name of the person to be emailed), followed by an icon to highlight that it is an external link.

{{Email|address}} produces the same result as [Mailto:<span class="example" style="font-family: Georgia, 'DejaVu Serif', serif; color: var(--color-content-added, #006400);" >address</span> <span class="example" style="font-family: Georgia, 'DejaVu Serif', serif; color: var(--color-content-added, #006400);" >address</span>]:

You may make a link that sends an email to multiple addresses by entering multiple addresses separated by semicolons, such as {{Email | John.Doe@gmail.com;Jane.Smith@science.doe.gov| John and Jane}}, which would result in John and Jane.

Parameters

Parameter Description Notes
|address= The email address to link to. Required. The |address= may be omitted if this is the first unnamed parameter.
|name= Name to use as the link text instead of displaying the email address. Optional. The |name= may be omitted if this is the second unnamed parameter.
|sort= Enter the name in last name, first name order (or whatever other sort basis you prefer) if it is being used in a sortable table. Optional. The |sort= may be omitted if it is the third unnamed parameter.

Examples

What you type Results
{{email| John.Doe@gmail.com}} John.Doe@gmail.com
{{email| Jane.Smith@science.doe.gov}} Jane.Smith@science.doe.gov
{{email| name=James Johnson| address=JohnsonJ@nnsa.doe.gov}} James Johnson
{{email| JohnsonJ@nnsa.doe.gov| James Johnson}} James Johnson


Sorting

Click the up and down triangles after the column header in the second column to compare how the first table sorts by first name and the second by last name.

Without |sort=
{| class=sortable 
! Names
|-
| {{email | charlie.indigo@gmail.com | Charlie Indigo}}
|-
| {{email | Name=Roger Queen | Roger.Queen@gmail.com}}
|-
| {{email | address=Pete.King@gmail.com | name=Peter King}}
|-
| {{email | Address=george.love@gmail.com | Name=George Love}}
|-
| {{email | Michael.Baker@gmail.com | name=Mike Baker}}
|-
| {{email | name=William Fox | address=Bill.Fox@gmail.com }}
|}
Names
Charlie Indigo
Roger Queen
Peter King
George Love
Mike Baker
William Fox
With |sort=
{| class=sortable 
! Names
|- 
| {{email | charlie.indigo@gmail.com | Charlie Indigo | Indigo, Charlie}}
|-
| {{email | Name=Roger Queen | Roger.Queen@gmail.com | Sort=Queen, Roger}}
|-
| {{email | address=Pete.King@gmail.com | name=Peter King | sort=King, Peter}}
|-
| {{email | Address=george.love@gmail.com | Name=George Love | Sort=Love, George}}
|-
| {{email | Michael.Baker@gmail.com | name=Mike Baker | sort=Baker, Mike}}
|-
| {{email | sort=Fox, William | name=William Fox | address=Bill.Fox@gmail.com}}
|}
Names
Charlie Indigo
Roger Queen
Peter King
George Love
Mike Baker
William Fox