code: @Override
      public void sendMail(final String theTo,
                           final String theFrom,
                           final String theSubject,
                           final String theBody) {
          if (log.isDebugEnabled()) {
              log.debug("Sending mail, TO: <" + theTo + ">, FROM: <" + theFrom +
                      ">, SUBJECT: <" + theSubject + ">, CONTENT: <" + theBody + '>');
          }
  
          try {
              SmtpServer smtpOrSmtpsService = (SmtpServer) (services.containsKey(ServiceProtocol.SMTP) ?
                      services.get(ServiceProtocol.SMTP) : services.get(ServiceProtocol.SMTPS));
              if (null == smtpOrSmtpsService) {
                  throw new IllegalStateException("No required smtp or smtps service configured!");
              }
  
              Session session = smtpOrSmtpsService.createSession();
  
              Address[] tos = new InternetAddress[]{new InternetAddress(theTo)};
              Address from = new InternetAddress(theFrom);
              MimeMessage mimeMessage = new MimeMessage(session);
              mimeMessage.setSubject(theSubject);
              mimeMessage.setFrom(from);
  
              mimeMessage.setText(theBody);
              Transport.send(mimeMessage, tos);
          } catch (Exception e) {
              throw new RuntimeException("Can not send mail", e);
          }
      }
docs: {@inheritDoc}