In a one-to-one relationship, where should the foreign key be placed?

You can use url package for this.

\documentclass{article}
\usepackage[colorlinks]{hyperref}
\usepackage[T1]{fontenc}
\DeclareUrlCommand\email{\urlstyle{rm}}

\begin{document}
\email{[email protected]}
\end{document}

enter image description here


An expl3 implementation:

\documentclass{article}
%\usepackage[T1]{fontenc}
\usepackage{color,xparse,l3regex,hyperref}

\ExplSyntaxOn
\NewDocumentCommand{\email}{m}
 {
  \svend_email:n { #1 }
 }
\tl_new:N \l_svend_email_tl
\seq_new:N \l_svend_email_seq
\cs_generate_variant:Nn \seq_set_split:Nnn { NnV }
\cs_new_protected:Npn \svend_email:n #1
 {
  \tl_set:Nn \l_svend_email_tl { #1 }
  \regex_replace_all:nnN { \cD. } { \c{textunderscore} } \l_svend_email_tl
  \seq_set_split:NnV \l_svend_email_seq { @ } \l_svend_email_tl
  \href{ mailto:#1 }{ \emailfont \seq_use:Nn \l_svend_email_seq { \emailat } }
 }
\ExplSyntaxOff
\newcommand\emailfont{\sffamily}
\newcommand\emailat{{\color{red}\small @}}

\begin{document}
\email{[email protected]}
\email{[email protected]}
\end{document}

enter image description here