Title: auto-mail to admin
Last modified: November 20, 2016

---

# auto-mail to admin

 *  Resolved [bustel](https://wordpress.org/support/users/bustel/)
 * (@bustel)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/auto-mail-to-admin/)
 * hello
 * great plugin, i have a question. When a user send a message to another user, 
   is there an option to set an auto-mail to the admin of the site? just to send
   the info there is a new message send…
 * thanks
    manuel

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Shamim Hasan](https://wordpress.org/support/users/shamim51/)
 * (@shamim51)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/auto-mail-to-admin/#post-8462546)
 * You can use fep_action_message_after_send action hook to send email.
 *  Thread Starter [bustel](https://wordpress.org/support/users/bustel/)
 * (@bustel)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/auto-mail-to-admin/#post-8462560)
 * thank you for the response. Is that another plugin ?
 *  Plugin Author [Shamim Hasan](https://wordpress.org/support/users/shamim51/)
 * (@shamim51)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/auto-mail-to-admin/#post-8462606)
 * You can learn more about action hook from [https://codex.wordpress.org/Plugin_API#Actions](https://codex.wordpress.org/Plugin_API#Actions)
   [http://codex.wordpress.org/Glossary#Action](http://codex.wordpress.org/Glossary#Action)
   or search in google
 * To send mail when a message is sent add following code in your theme’s functions.
   php
 *     ```
       add_action( 'fep_action_message_after_send', function() {
   
       	wp_mail( 'abc@example.com', 'Subject', 'Content' );
       });
       ```
   
 * Change mail address to your admin mail address, also change Subject and Content
   as you like.
    It needs your php version to be 5.3+
 *  Thread Starter [bustel](https://wordpress.org/support/users/bustel/)
 * (@bustel)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/auto-mail-to-admin/#post-8462714)
 * Hello
 * it isn’t another plugin I have seen on your page. So how can i set it, is it 
   in the function.php?
 * if (!is_admin())
    add_action(‘fep_action_message_after_send’);
 * and where do I set the e-mail from the admin?
 * thanks
 *  Thread Starter [bustel](https://wordpress.org/support/users/bustel/)
 * (@bustel)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/auto-mail-to-admin/#post-8462717)
 * thank you! 🙂

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘auto-mail to admin’ is closed to new replies.

 * ![](https://ps.w.org/front-end-pm/assets/icon-256x256.gif?rev=2309447)
 * [Front End PM](https://wordpress.org/plugins/front-end-pm/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/front-end-pm/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/front-end-pm/)
 * [Active Topics](https://wordpress.org/support/plugin/front-end-pm/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/front-end-pm/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/front-end-pm/reviews/)

## Tags

 * [admin](https://wordpress.org/support/topic-tag/admin/)
 * [auto](https://wordpress.org/support/topic-tag/auto/)
 * [mail](https://wordpress.org/support/topic-tag/mail/)

 * 5 replies
 * 2 participants
 * Last reply from: [bustel](https://wordpress.org/support/users/bustel/)
 * Last activity: [9 years, 5 months ago](https://wordpress.org/support/topic/auto-mail-to-admin/#post-8462717)
 * Status: resolved