Details

      Description

      In com.liferay.util.mail.MailEngine, the send method is capturing a javax.mail.SendFailedException and logging this exception.

      The problem is that, the exception is not thrown, so, for a caller it is impossible to know if there was an error.

      MailEngine.java
      public static void send(InternetAddress from, InternetAddress[] to, InternetAddress[] cc,InternetAddress[] bcc, InternetAddress[] bulkAddresses,String subject, String body, boolean htmlFormat,InternetAddress[] replyTo, String messageId, String inReplyTo,List<FileAttachment> fileAttachments, SMTPAccount smtpAccount)throws MailEngineException {
       ....
          try {
             ....
          }
         catch (SendFailedException sfe) {
             _log.error(sfe);
          }
          catch (Exception e) {
            throw new MailEngineException(e);
         }
         if (_log.isDebugEnabled()) {
            _log.debug("Sending mail takes " + stopWatch.getTime() + " ms");
         }
      }
      

      It would be useful if the behaviour could be configurable via portal.properties and the exception could be thrown

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  5 years, 35 weeks ago

                  Packages

                  Version Package
                  6.1.X EE
                  6.2.2 CE GA3
                  6.2.X EE
                  7.0.0 M1