title: How to use Tomcat as SMTP server to send and receive mail using Javamail
body: <p>I never used Tomcat and Javamail before. My main experiences was SpringBoot services. But now I have got task to create service to send and received mail for application with standalone Tomcat server. I cant understand how to use Tomcat as a mail server. I cant find any lesson on this topic. All tutorials about Javamail use outer SMTP servers like gmail or other.
  Please help me where can I find appropriate tutorial or give me advice how to start teach this problem.</p>