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

Warn traces in MailEngine are not written to log file

    Details

      Description

      Warn traces in MailEngine are not written to log file, so in case Liferay doesn't connect to SMTP server, the problem is silently ignored

      Root cause of this issue:

      • MailEngine was moved from com.liferay.util.mail to com.liferay.petra.mail but portal-log4j.xml wasn't updated

      Steps to reproduce

      1. Start Liferay in a computer without SMTP server configured.
        • Windows usually doesn't have SMTP server enabled.
        • You can check if SMTP is enabled or not executing telnet localhost 25
      2. Go to "Sign In" => "Create account"
      3. Create a test account with any random value
      4. After account creation, a email is sent, check log file:
        • Expected behevior: A warning is written in log
          • 2019-08-29 11:56:10.856 WARN [liferay/mail-1][MailEngine:634] Unable to connect to a valid mail server. Please make sure one is properly configured: Could not connect to SMTP host: localhost, port: 25
        • Wrong behevior: No warning is written in log

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                summer.zhang Summer Zhang
                Reporter:
                jorge.diaz Jorge Diaz
                Participants of an Issue:
                Recent user:
                Clarissa Velazquez
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  9 weeks, 5 days ago

                  Packages

                  Version Package
                  7.0.0 DXP FP87
                  7.0.10.12 DXP SP12
                  7.0.X
                  7.1.10 DXP FP14
                  7.1.X
                  7.2.10 DXP FP2
                  7.2.10.1 DXP SP1
                  7.2.X
                  Master