Tell me, are there any utilities for Java EE to send emails? Saw standard java vskie but they are outdated. Found a piece of Apache error gives:

HTTP Status 500 - Servlet execution threw an exception

type Exception report

message servlet execution threw an exception

Description The server encountered an internal error that prevented it from fulfilling this request.

exception

  javax.servlet.ServletException: Servlet execution threw an exception
     org.apache.tomcat.websocket.server.WsFilter.doFilter (WsFilter.java:52)

root cause

  java.lang.NoClassDefFoundError: javax / mail / internet / AddressException
     de.sniff.Sniff.SendEmail (Sniff.java.7343)
     de.sniff.Controller.doPost (Controller.java:23)
     javax.servlet.http.HttpServlet.service (HttpServlet.java:648)
     javax.servlet.http.HttpServlet.service (HttpServlet.java:729)
     org.apache.tomcat.websocket.server.WsFilter.doFilter (WsFilter.java:52)

root cause

  java.lang.ClassNotFoundException: javax.mail.internet.AddressException
     org.apache.catalina.loader.WebappClassLoaderBase.loadClass (WebappClassLoaderBase.java:1285)
     org.apache.catalina.loader.WebappClassLoaderBase.loadClass (WebappClassLoaderBase.java:1119)
     de.sniff.Sniff.SendEmail (Sniff.java.7343)
     de.sniff.Controller.doPost (Controller.java:23)
     javax.servlet.http.HttpServlet.service (HttpServlet.java:648)
     javax.servlet.http.HttpServlet.service (HttpServlet.java:729)
     org.apache.tomcat.websocket.server.WsFilter.doFilter (WsFilter.java:52)

The Apache Tomcat / 8.5.8 logs.

Apache Tomcat / 8.5.8

Why - I can not understand.

Whether prompt there are still any pribludy?

    1 answer 1

    JavaMail is a Java API designed to receive and send email using SMTP, POP3 and IMAP protocols.
    It is an integral part of JavaEE.

    On Wikipedia https://ru.wikipedia.org/wiki/JavaMail you can even see an example.

    But there is a problem.
    JavaEE has two profiles that differ in the set of specifications included: Full Profile and truncated Web profile.
    JavaMail from a web profile is fucking fucking like so much else.
    Tomcat provides only a web profile.

    java.lang.NoClassDefFoundError: javax/mail/internet/AddressException , java.lang.ClassNotFoundException: javax.mail.internet.AddressException is just a confirmation of this. No JavaMail classes found.

    It would seem with JavaMail you are in the span.
    But nothing prevents you from downloading the JavaMail library and installing it on your server (in the shared libraries folder) or including it in the web application. https://java.net/projects/javamail/pages/Home#Download_JavaMail_Release