Support » Plugin: Email Users » Secondary email for a user

  • alanjacobs

    (@alanjacobs)


    Hi,
    If I have a custom field holding a secondary email address for a user, would it be possible for Email Users to pick this up?

    It would require Email Users to retrieve both email addresses from each userid ( provided the second is not empty ). Needs to work for any of the Group/filter options.

    Is this sort of thing possible?

    Cheers
    Alan

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Mike Walsh

    (@mpwalsh8)

    In theory, anything is possible. How much effort to achieve it is the unknown.

    I do think it would be possible but it would likely take some work to develop a filter or action to achieve what you want to do, at least what I think you want to do.

    When the address list is being constructed, you would need an action to query each user for a secondary address and if found, add it to the list. Does it go in place of or in additional to the first email address found? I think you could do this as part of a mailusers_before_wp_mail action.

    alanjacobs

    (@alanjacobs)

    Hi, Sorry for the delay – Yet another PC rebuild!

    Yes every user has an additional email address field. In most cases this will be blank and only a few populated.
    So yes When building an address list I’d like the additional field to be added to the list.

    Would the mailusers_before_wp_mail action fire before or after the other filters that I’ll be using? As I’d still want to select a subset of users ( e.g. Fire Dept, Blue Watch ). So I’m hoping the list is built and then looped through to add the secondary email address if not blank.

    The secondary email address needs to be added on every email sending, regardless of filter.

    Cheers
    Alan

    Plugin Author Mike Walsh

    (@mpwalsh8)

    I honestly don’t know the answer to your question about order, I would think it would happen after the users are selected when the email headers are constructed. I suspect the only way to know for sure is to try it. Sorry I can’t give you a better answer but I think this one requires some actual coding to see if you can get it to work.

    Hi,
    Many thanks for taking the time to reply.
    I’ll have a play and see if I can get something to work.
    I’ll update if I can.

    Cheers
    Alan

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Secondary email for a user’ is closed to new replies.