I'd like to define an email macro that does the following:
Input: \domainemail{Jack Johnson}
Output: Jack Johnson
The output should be a highlighted hyperlink that reads "mailto:[email protected]".
What I have is
\usepackage[colorlinks=true,allcolors=DarkBlue]{hyperref}
\newcommand{\domainemail}[1]{\href{mailto:#[email protected]}{#1}}
which produces the link "mailto:Jack [email protected]"
How can I replace the space with a period and upper- with lowercase initials? I tried enclosing #1
with \lowercase
but that seems to break the hyperlink.
Bonus
Extra points if \domainemail
can handle umlauts (including ß) and multiple first and last names, e.g.
Input: \domainemail{Johnson-Löffler, Jack Björn}
Output: Johnson-Löffler, Jack Björn with hyperlink "mailto:[email protected]"