private String getEmail(final Server server) {
    String email = null;

    final Xpp3Dom configuration = (Xpp3Dom) server.getConfiguration();

    if (configuration != null) {
      final Xpp3Dom emailNode = configuration.getChild("email");

      if (emailNode != null) {
        email = emailNode.getValue();
      }
    }

    return email;
  }
Get the email from the server configuration in <code>~/.m2/settings.xml</code>.

<pre>{@code
<servers>
  <server>
    <id>my-private-docker-registry</id>
    [...]
    <configuration>
      <email>foo@bar.com</email>
    </configuration>
  </server>
</servers>
}</pre>

The above <code>settings.xml</code> would return "foo@bar.com".
@param server {@link Server}
@return email, or {@code null} if not set
src/main/java/com/spotify/docker/AbstractDockerMojo.java