If email address is mapped in a document always the first email address in the portlet is selected
However as per customer's requirement primary email address should be used
"Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental."
Create a rule
Mapp email address in the template using the rule
KBA , LOD-SF-EC-DOC , Document Generation , Problem