How to change sender email address in workflows

Sending email from one email address or a different email per company or based on any other criteria is only currently possible through an entry point.

Entry point "EMAIL" on process AWRKMEL caters for this request.

1. Create a file ZAWRKMEL in function ADOTRT and copy code below and compile.

#ENTRY POINT ZAWRKMEL ON ON FILE AWRKMEL

 $ACTION

Case ACTION

  When "EMAIL" : Gosub EMAIL

Endcase

Return

 

$EMAIL

EXP_MAIL = '[email protected]'     #EXP_MAIL is a variable containing email "from" address

Return

2. Add the ZAWRKMEL file to the entry point function(GESAPE), process will be AWRKMEL.

3. Log out and Login again before testing with any workflow.

[email protected] will be the email used as "from" on all system outgoing emails.