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

Workflow emails use hardcoded from-address which causes problems in cloud environment

    Details

    • Type: Bug
    • Status: In Review
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 7.0.X, Master
    • Fix Version/s: Master
    • Component/s: Workflow
    • Fix Priority:
      3

      Description

      Description

      AWS requires from addresses to be validated but the EmailNotificationSender for Workflow is hardcoded to use no-reply@liferay.com which cannot be validated.

      This is not like the behavior in other portlets where the from address is configurable and therefore can be easily made to work in a cloud environment:

      https://github.com/liferay/liferay-portal/blob/master/modules/apps/forms-and-workflow/portal-workflow/portal-workflow-kaleo-runtime-impl/src/main/java/com/liferay/portal/workflow/kaleo/runtime/internal/notification/EmailNotificationSender.java

      @Component(
      immediate = true,
      property = {
      "fromAddress=no-reply@liferay.com",
      "fromName=Liferay Portal Workflow Notifications",
      "notification.type=email"
      },
      service = NotificationSender.class
      )
      public class EmailNotificationSender
      extends BaseNotificationSender implements NotificationSender {
      

      Steps to reproduce

      0) Configure an SMTP server in Server Administration.
      1) Turn up logging on com.liferay.util.mail.MailEngine to DEBUG via Server Administration. This will allow the from address to be seen in the logs.
      2) Enable workflow on a Web Content folder using the stock Single Approver workflow.
      3) Add a Web Content to this folder and submit for publication.

      Results of Testing

      Expected Result: The notification email is sent using a configured from name and address by setting these portal properties:

      workflow.email.from.address=workflow-mail@test.com
      workflow.email.from.name=Workflow Name
      

      Actual Results: The name is hardcoded to Liferay Portal Workflow Notifications and the address is hardcoded to no-reply@liferay.com.

      Errors/Logs

      16:29:07,855 DEBUG [liferay/mail-1][MailEngine:202] From: Liferay Portal Workflow Notifications <no-reply@liferay.com>
      16:29:07,860 DEBUG [liferay/mail-1][MailEngine:203] To: [Test Test <test@liferay.com>]
      

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Days since last comment:
                1 day ago