I’ve a multisite enabled WordPress configuration. My primary area is like http://www.instance.com, with a number of subdomains like http://test1.instance.com, http://test2.instance.com, and so forth.
I’ve written a perform in my multisite theme’s perform file to ship some notifications to the multisite customers.
$headers[] = 'Content material-Kind: textual content/html; charset=UTF-8';
wp_mail('person@instance.com', 'Take a look at','Take a look at', $headers);
It ship the mails as desired when on the principle area, however it doesn’t ship any mails when utilized in subdomain perform recordsdata.
For instance, person@instance.com
is a registered person for http://test1.instance.com and he submitting some info in his subdomain web page http://test1.instance.com/information-form. I need to ship that info to that person’s e mail.
EDIT: Eventualities:
- I’ve a kind which have some enter fields.
- Customers fills it and upon submitting, utilizing ajax the values transferred to capabilities file.
- There’s a
add_action('wp_ajax_xxx', 'myFunction');
hook in perform web page (Consumer is logged in) - In
myFunction
the above talked about code resides.