Site icon Hip-Hop Website Design and Development

wp_mail() not sending e mail in multisite subdomain

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:

  1. I’ve a kind which have some enter fields.
  2. Customers fills it and upon submitting, utilizing ajax the values transferred to capabilities file.
  3. There’s a add_action('wp_ajax_xxx', 'myFunction'); hook in perform web page (Consumer is logged in)
  4. In myFunction the above talked about code resides.