Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-60608

MailService should use a persistent store

    Details

      Description

      I am using

      com.liferay.mail.service.MailServiceUtil.sendEmail(message)
      

      to send an email.

      E-Mail ist sent asynchronous.

      If the SMTP-Host is not reachable (maybe no DNS entry or shut down) the following Exception is thrown:

      2015-11-16 14:38:39,307 ERROR [liferay/mail-1][MailEngine:132] null
      
      java.net.UnknownHostException: mail.xxxxxxxxxxxxxxxxxxxxxx.de
      
              at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:178)
      
              at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
      
              at java.net.Socket.connect(Socket.java:579)
      
              at java.net.Socket.connect(Socket.java:528)
      
              at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:232)
      
              at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)
      
              at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1250)
      
              at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:370)
      
              at javax.mail.Service.connect(Service.java:275)
      
              at javax.mail.Service.connect(Service.java:156)
      
              at javax.mail.Service.connect(Service.java:105)
      
              at javax.mail.Transport.send0(Transport.java:168)
      
              at javax.mail.Transport.send(Transport.java:98)
      
              at com.liferay.util.mail.MailEngine._send(MailEngine.java:593)
      
              at com.liferay.util.mail.MailEngine.send(MailEngine.java:352)
      
              at com.liferay.util.mail.MailEngine.send(MailEngine.java:427)
      
              at com.liferay.mail.messaging.MailMessageListener.doMailMessage(MailMessageListener.java:93)
      
              at com.liferay.mail.messaging.MailMessageListener.doReceive(MailMessageListener.java:108)
      
              at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)
      
              at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:72)
      
      

      The caller of the method MailServiceUtil.sendEmail(message) is not informed about this.

      There is no retry. After shutdown of Liferay, all mail data is lost.

      Liferay should use a persistent storage for storing e-mail data, so that e-mails are hold and sent, when the STMP-Host is reachable.

        Attachments

          Activity

            People

            Assignee:
            support-lep@liferay.com SE Support
            Reporter:
            dankert Jan Dunkerbeck
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:

                Packages

                Version Package