emailContact - which email is used

I’m using emailConact to send email to one of the contacts which are kept in Ascend CRM (somewhere).
When editing/viewing a contact in the site dashboard, there is an option to define several emails for a single contact, each one with a label (main, home…). However, either the CreateContact() or the getContactById() does not provide a way to define the label for each email address.
In addition, when invoking emailContact() for specific contact which has several emails, the current. logic based on my testing is that the latest inserted contact’s email is being used for the sending the email. There’s no way to indicate via emailContact() which email to use, I would expect that in this case, the “main” email will be used.
All the above means that I need to keep the contact’s emails in a separate collection and update the contact with the email before invoking emailContact() so I can control to which email address the email is sent to.

Any other suggestion, observations?

thanks.

1 Like