Although I agree that it is not clear from the documentation or the 8th entry in the FAQ pointed out by Werner, all the templates use \title, \author, \ead etc after \begin{document} and \begin{frontmatter}.
The reason it does not work before \begin{document} is that (for some reason), it writes the email addresses to the aux file (which means it needs two runs), and the aux file doesn't get read and re-opened for writing until \begin{document} (so in fact you see lines like \emailauthor{a1@myuniversity.edu}{Author 1} appearing on the terminal instead of getting written to the aux file).
Note that the frontmatter environment does nothing except \maketitle at the end (and some grouping), so I guess the supported syntax is to replace your \maketitle with the frontmatter environment. I have also done this in the following modification of your example.
I have also deleted the unwanted space between the author name and \corref.
Remember that you need to compile twice to see the e-mail addresses.
\documentclass{elsarticle}
\begin{document}
\begin{frontmatter}
\title{Remarks on something interesting}
\author[myu]{Author 1}
\ead{a1@myuniversity.edu}
\author[myu]{Author 2\corref{cor1}}
\ead{a2@myuniversity.edu}
\address[myu]{My Department, My Building, My University in My City}
\cortext[cor1]{Corresponding author}
\end{frontmatter}
\end{document}
Image of footer displaying the e-mail addresses (inspired by Gonzalo Medina's previous answer):
