Using Outlook wrt New email client for Sage X3 workflow notifications post.

SOLVED

Reference: https://www.sagecity.com/us/sage_erp_x3/f/sage-x3-announcements-news-and-alerts/187389/new-email-client-for-sage-x3-workflow-notifications

I am using a Microsoft Outlook account (assume name as [email protected]) which requires FROM to match the email relay's email account used (in this case: [email protected]).

I switch over to the new email client and did the settings as per the post.

The email relay test mail is all OK.

When I do a direct workflow email

```

Application error
error : 4 Message failed: 554 5.2.252 SendAsDenied; [email protected] not allowed to send as [email protected]; STOREDRV.Submission.Exception:SendAsDeniedException.MapiExceptionSendAsDenied; Failed to process message due to a permanent

```

I was login as ADMIN and the workflow email set for this user is: [email protected]

Previously, I would use a customized YAWRKMEL (based on AWRKMEL script) to resolve this issue by hardcoding in the sender mail address but this script seems to be skipped out.

How to resolve this without recommending using other email providers like GMail or installing a dedicated email relay inside the server or setting every user to use the sender email?

Parents
  • +1
    verified answer

    Hi,

    AWRKMEL may not run anymore (for obvious reasons), but there is still a workaround to this issue.

    Since script AWRK still needs to get called to build the message, you can use entry point MESSAGE in script AWRK. The only thing you need to have is a classic user that contains the email of the notification server. Variable USRWRK is the code of the user that triggered the workflow. The script below changes the user that triggered the workflow it to someone else. When it goes to send the email, it takes the email from that new classic user.

    If you add an entry point to script AWRK, your specific script in the entry point can say something like this:

    ---

    $ACTION
     Case ACTION
      When "MESSAGE" : Gosub MESSAGE
      When Default
     Endcase
    Return

    $MESSAGE
     If [F:AWA]CODE = "BLKUSR" #conditional is optional, in this example I say to change only for workflow BLKUSR
      USRWRK = "MYUSR" #where MYUSR is classic user code containing the email of the notification server.
     Endif

    Return

    ---

    This was tested in V12 P33 with success.

    Regards,

    Andrew

  • 0 in reply to Andy S

    Confirmed!

    For reference:

    Then edit in the specific script from Andy S above.

  • 0 in reply to chunheng

    You can setup sender Email address in Workflow setup in latest release.

  • 0 in reply to Charlie Cai

    Yes (since v12p33), but I need to add the Sender email on all the workflow rules (GESAWA).

    Which sounds tedious for every new workflow rules created and when management decided to change email providers.

    I would prefer creating Entry Point to AWRK as compromise to set once and forget.

    It would be nice if I can just set once and forget from Administration > Notification Server but Sage X3 tech not there yet.

  • +1 in reply to chunheng
    verified answer

    Have you considered seeing if adding a default value to field SENDMAIL in screen AWA3 so that at least for future created workflows, the Sender line gets filled automatically? Then also add a control to say that the field is both mandatory and must be that email value so when someone goes to modify the workflow, it forces their hand?

    You can then mass update table AWRKPAR SENDMAIL field with your email and the just have to validate your workflows again. So a bit of pain at the beginning, then smooth sailing afterwards.

Reply
  • +1 in reply to chunheng
    verified answer

    Have you considered seeing if adding a default value to field SENDMAIL in screen AWA3 so that at least for future created workflows, the Sender line gets filled automatically? Then also add a control to say that the field is both mandatory and must be that email value so when someone goes to modify the workflow, it forces their hand?

    You can then mass update table AWRKPAR SENDMAIL field with your email and the just have to validate your workflows again. So a bit of pain at the beginning, then smooth sailing afterwards.

Children