[Tex/LaTex] Affiliations with multiple lines of information

affiliationauthblkline-breakingtitles

I want to format affiliations for a paper in a certain way – so that is looks like the following

enter image description here

I have tried the following code

\title{TITLE}
\author[1]{Author1}
\affil[1]{School \\ University \\ Email: author1@university.com}
\author[2]{Author 2}
\affil[2]{School \\ University \\ Email: author2@university.com}

and also

\title{TITLE}
\author{Author1}
\affil{School \\ University 
\\ Email: author1@university.com}

\author{Author 2}
\affil{School \\ University
\\ Email: author2@university.com}

But both produce results which are subtly wrong. Any suggestions?

Here is the code used to produce what I have so far:

Yes I am using authblk.

\documentclass{article}
\usepackage[]{authblk}

\begin{document}

\title{TITLE}
\author[1]{Author1}
\affil[1]{School \\ University 
 \\ Email: author1@university.com}

 \maketitle

\end{document}

Best Answer

\protect the line breaks:

enter image description here

\documentclass{article}
\usepackage{authblk}

\begin{document}

\title{TITLE}
\author[1]{Author1}
\affil[1]{School \protect\\ University \protect\\ Email: author1@university.com}

\maketitle

\end{document}