Title: Can you send messages programatically
Last modified: August 10, 2019

---

# Can you send messages programatically

 *  Resolved [Michael Soriano](https://wordpress.org/support/users/mks6804/)
 * (@mks6804)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/can-you-send-messages-programatically/)
 * Great plugin! This is definitely useful for the new site I’m building. I have
   a question – Is there a function that I can use to send messages programatically?
 * Meaning, I want to use it in my theme when users click a button – and it sends
   a message through your plugin.
 * Thanks in advance.

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

 *  Thread Starter [Michael Soriano](https://wordpress.org/support/users/mks6804/)
 * (@mks6804)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/can-you-send-messages-programatically/#post-11820344)
 * I found this sample code to customize when user registers:
 *     ```
            // Prepare message data
               $message = array(
                    'message_title' => 'Welcome ' . fep_get_userdata( $user_id, 'display_name', 'id' ), //change with message title
                    'message_content' => 'CONTENT', //change with message content
                    'message_to_id' => $user_id
               );
   
               $override = array(
                    'mgs_author' => 1, //change with message sender id
               );
   
               // Send message
              fep_send_message( $message, $override );   
       ```
   
 * I think this is what I need.
 * Follow up question: Is there an API section of the docs besides filters/actions?
   Mainly for the “fep_” methods we can use?
 *  Plugin Author [Shamim Hasan](https://wordpress.org/support/users/shamim51/)
 * (@shamim51)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/can-you-send-messages-programatically/#post-11826585)
 * I confess documentation is not good for this plugin.
    You can see functions.php
   of this plugin for functions which can be used.

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

The topic ‘Can you send messages programatically’ 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

 * [api](https://wordpress.org/support/topic-tag/api/)

 * 2 replies
 * 2 participants
 * Last reply from: [Shamim Hasan](https://wordpress.org/support/users/shamim51/)
 * Last activity: [6 years, 10 months ago](https://wordpress.org/support/topic/can-you-send-messages-programatically/#post-11826585)
 * Status: resolved