title: How to send email notifications with slf4j / log4j2?
body: <p>I've looked into other questions that are similar and have done some googling to find my answer but my question is still unanswered. I'm still unfamiliar with how some of this works, so bear with me.</p>
  
  <p>Our maven pom.xml is using the slf4j dependency: </p>
  
  <p><img src="https://i.stack.imgur.com/9dHRL.png" alt="pom.xml importing slf4j from using maven"></p>
  
  <p>and our log4j2.xml file looks like this:</p>
  
  <p><img src="https://i.stack.imgur.com/UVPHv.png" alt="log4j2.xml file containing smtp appender"></p>
  
  <p>I only added this to the above log4j2.xml file <code>&lt;SMTP name="Mail" ...&gt; &lt;/SMTP&gt;</code> and lower down in the file i added <code>&lt;logger name="com.path.class1" ...&gt; &lt;appender ...&gt; &lt;/logger&gt;</code> </p>
  
  <p>But for some reason, when I call log.error("error message"), my email isn't sent to me. I know the smtp host works because it is used in a .NET service. The smtp server does not require any credentials to use it. I know that my log.error call is in the correct directory and file path. I've tried setting the port, but that didn't make any difference. How do i go about getting the email notifications to work?</p>
  
  <p>I even tried the mailAppender, but that didn't work either:<img src="https://i.stack.imgur.com/MPUbc.png" alt="enter image description here"></p>