0
votes

I'm sure this isn't possible but I thought I would ask.

In my functions.php file I have a wp_mail function that sends an email to moderators when posts are made.

This email is sent to number of different address - these addresses might change.

I thought it would easier to set these email addresses in the WP Dashboard something like on custom page and then have functions.php update with the new emails.

Is this possible?

1

1 Answers

1
votes

Yes, this is possible.

With out getting into the specific coding details you would need to store the different email addresses in the database.

You could tie in advanced custom fields to the wp_mail function to pull the different address from a list. That way you could skip building a page in the dashboard to display the addresses.

Regardless some custom coding would need to happen in the mail function to grab the data from advanced custom fields.