I'm using moderncv to write my CV. I'm using the classic style and I want to add a second e-mail address. It doesn't work if I simply do that:

\mail{email1}

\mail{email2}


Is there a way to do it?

-
This is very similar to How to add new command in moderncv template? –  Werner Sep 26 '12 at 21:10
Do you need each email to have its own logo? –  Gonzalo Medina Sep 26 '12 at 21:10
yes, that would be better if each e-mail had a logo. –  Franck Sep 26 '12 at 21:26

All you need to do is to define a newcommand (say, \emailtwo), completely analogous to \email as defined in moderncv.cls and then to modify appropriately the \makecvtitle command (as implemented in moderncvclassic.sty) to conditionally include the information for this new field:

\documentclass{moderncv}
\moderncvstyle{classic}
\makeatletter
\newcommand*{\emailtwo}[1]{\def\@emailtwo{#1}}
\renewcommand*{\makecvtitle}{%
% recompute lengths (in case we are switching from letter to resume, or vice versa)
\recomputecvlengths%
% optional detailed information box
\newbox{\makecvtitledetailsbox}%
\savebox{\makecvtitledetailsbox}{%
\begin{tabular}[b]{@{}r@{}}%
\ifthenelse{\isundefined{\@mobile}}{}{\makenewline\mobilesymbol\@mobile}%
\ifthenelse{\isundefined{\@phone}}{}{\makenewline\phonesymbol\@phone}%
\ifthenelse{\isundefined{\@fax}}{}{\makenewline\faxsymbol\@fax}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}%
\end{tabular}
}%
% optional picture box
\newbox{\makecvtitlepicturebox}%
\savebox{\makecvtitlepicturebox}{%
\ifthenelse{\isundefined{\@photo}}%
{}%
{%
\hspace*{\separatorcolumnwidth}%
\color{color1}%
\setlength{\fboxrule}{\@photoframewidth}%
\ifdim\@photoframewidth=0pt%
\setlength{\fboxsep}{0pt}\fi%
\framebox{\includegraphics[width=\@photowidth]{\@photo}}}}%
% name and title
\newlength{\makecvtitledetailswidth}\settowidth{\makecvtitledetailswidth}{\usebox{\makecvtitledetailsbox}}%
\newlength{\makecvtitlepicturewidth}\settowidth{\makecvtitlepicturewidth}{\usebox{\makecvtitlepicturebox}}%
\ifthenelse{\lengthtest{\makecvtitlenamewidth=0pt}}% check for dummy value (equivalent to \ifdim\makecvtitlenamewidth=0pt)
{\setlength{\makecvtitlenamewidth}{\textwidth-\makecvtitledetailswidth-\makecvtitlepicturewidth}}%
{}%
\begin{minipage}[b]{\makecvtitlenamewidth}%
\namestyle{\@firstname\ \@familyname}%
\ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\titlestyle{\@title}}%
\end{minipage}%
\hfill%
% detailed information
\llap{\usebox{\makecvtitledetailsbox}}% \llap is used to suppress the width of the box, allowing overlap if the value of makecvtitlenamewidth is forced
% optional photo
\usebox{\makecvtitlepicturebox}\\[2.5em]%
% optional quote
\ifthenelse{\isundefined{\@quote}}%
{}%
{{\centering\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\\[2.5em]}}%
\par}% to avoid weird spacing bug at the first section if no blank line is left after \makecvtitle

\renewcommand*{\makelettertitle}{%
% recompute lengths (in case we are switching from letter to resume, or vice versa)
\recomputeletterlengths%
% sender contact info
\hfill%
\begin{minipage}{.5\textwidth}%
\raggedleft%
{\bfseries\upshape\@firstname~\@familyname}\@firstdetailselementfalse%
\ifthenelse{\isundefined{\@mobile}}{}{\makenewline\mobilesymbol\@mobile}%
\ifthenelse{\isundefined{\@phone}}{}{\makenewline\phonesymbol\@phone}%
\ifthenelse{\isundefined{\@fax}}{}{\makenewline\faxsymbol\@fax}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}}%
\end{minipage}\\[1em]
% recipient block
\begin{minipage}[t]{.5\textwidth}
\raggedright%
{\bfseries\upshape\@recipientname}\\%
\end{minipage}
% date
\hfill% US style
%  \\[1em]% UK style
\hbox{\today}\\[2em]% US informal style: "April 6, 2006"; UK formal style: "05/04/2006"
% opening
\raggedright%
\@opening\\[1.5em]%
% ensure no extra spacing after \makelettertitle due to a possible blank line
%  \ignorespacesafterend% not working
\hspace{0pt}\par\vspace{-\baselineskip}\vspace{-\parskip}}
\makeatother

\firstname{John}
\familyname{Doe}
\email{firstemail@gmail.com}
\emailtwo{secondemail@gmail.com}

\begin{document}

\makecvtitle

\end{document}


An image of the resulting document:

-
Thanks a lot, that's perfect ! –  Franck Sep 26 '12 at 22:43

A much simpler way, which also includes the email symbol is:

\extrainfo{\emailsymbol\emaillink{email@email.com}}


so:

\email{emailOne@email.com}

-

Another, a bit simpler, option would be to write for example:

\mobile{phone1 \\ phone2  \\}


Or

\address{address1 \\ address2 \\}


You only get one logo, hence it might not be exactly what you are looking for, but it turned out to be the preferred option for me.

-