I came across this excellent post from the forums, where poster BlackMumba detailed how to add and retrieve the associated email records for a record. Inspired by the post, I’ve brought his solution here and expanded upon it to show other use cases. Here’s how you can do it.
To add a new email address, you can do the following:
If you want to retrieve the primary email address for a record, you can do this:
And to grab all the email addresses for a record, use this code:
No hay relacionados:
{ 1 comment… read it below or add one }
Using $sea->addAddress($primaryemailaddress, true);
seems to remove all the non primary addresses?