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

      Description

      Description

      AWS requires from addresses to be validated but the EmailNotificationSender for Workflow is hardcoded to use [email protected] 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 = {
      "[email protected]",
      "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:

      [email protected]
      workflow.email.from.name=Workflow Name
      

      Actual Results: The name is hardcoded to Liferay Portal Workflow Notifications and the address is hardcoded to [email protected]

      Errors/Logs

      16:29:07,855 DEBUG [liferay/mail-1][MailEngine:202] From: Liferay Portal Workflow Notifications <[email protected]>
      16:29:07,860 DEBUG [liferay/mail-1][MailEngine:203] To: [Test Test <[email protected]>]
      

        Attachments

          Activity

            People

            Assignee:
            lu.liu Lu Liu
            Reporter:
            joshua.cords Joshua Cords
            Participants of an Issue:
            Recent user:
            Csaba Turcsan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              4 years, 10 weeks, 2 days ago

                Packages

                Version Package
                7.0.0 DXP FP33
                7.0.0 DXP SP7
                7.0.5 CE GA6
                7.0.X
                7.1.X
                Master