Announcement

Collapse
No announcement yet.

How to return all EmailAddress for a Contact

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to return all EmailAddress for a Contact

    Hello,

    I have an endpoint that needs to display all email addresses associated with the contact. I'm currently using: $contact->get('emailAddress'); which returns only returns the primary email. How can I get all of them?

    Thanks in advance,
    Stephen

  • #2
    After some more digging I found the solution with: $this->getEntityManager()->getRepository('EmailAddress')->getEmailAddressData($contact)

    Comment

    Working...
    X