The email.pl script can accept email address as userdata "eMail" in the rule block. This means if you have an email address defined as an attribute on a managed entity then the following syntax in the rule can be used to pass the email address to the email.pl action script:
userdata "eMail" attribute "Your_email_attribute_name"
For example, the "_EMAIL-TO" managed entity attribute contains 2 email addresses.
Then in the rule block, the email addresses can be passed to the Email_pl action script like below:
userdata "eMail" attribute "_EMAIL-TO"