The Email Sender user-exit was introduced at FLOE version 105. When a FLOE e-mail is sent the email sender address is determined globally by the "Email Sender Address" field in "System Settings" or it can be over-ridden by individual e-mail type if a value has been maintained for the "Email Sender Address" field in the "Maintain Email Types" transaction. With the introduction of the user-exit the sender address can be further over-ridden by custom code and can be different even for emails of the same type. Please note that the user-exit will only be available for email types created by FLOE version 105 (or higher).
The parameters of the User-Exit are:
Parameter | Type | SAP Type | Description |
---|---|---|---|
IM_ETYPE | Importing | /FLOE/ETYPE_CODE | The e-mail type passed in to the API |
IM_ELANG | Importing | /FLOE/ELANG | The communication language for the e-mail |
IM_DOCUMENT | Importing | /FLOE/DOC_REF | The external document reference if passed into the API |
IM_RECIPIENTS | Importing | /FLOE/REC_EMAIL_T | Table of recipients for the e-mail |
IM_VARIABLES | Importing | /FLOE/VARS_T | Table of variables and their values |
CH_SENDER_EMAIL | Changing | AD_SMTPADR | The email sender address |
Sample code to change the email sender:
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: |
*---------------------------------------------------------------------------* * <<< Start of Customer Code >>> * *---------------------------------------------------------------------------* DATA: ls_variables TYPE /floe/vars_s. READ TABLE im_variables INTO ls_variables WITH KEY var_code = 'COUNTRY'. IF ls_variables-value EQ 'GB'. ch_sender_email = 'hr@eversogood.co.uk'. ELSEIF ls_variables-value EQ 'US'. ch_sender_email = 'hr@eversogood.com'. ENDIF. *---------------------------------------------------------------------------* * <<< End of Customer Code >>> * *---------------------------------------------------------------------------* |