Hi,
Think best way to start is to include the mail adres in the organizational data. To obtain the organizational unit the user belongs to could be done with FM RH_GET_ORG_ASSIGNMENT.
This returns the O object ID of the organization unit. Then get the BP number of the organizational unit, and reads the addres of this BP. Then replace sender with mail addres you have found.
Hope it helps.
Regards,
Martin