Notification emails using fep_send_message function


Home Forums Front End PM PRO Notification emails using fep_send_message function

This topic is: Not Resolved
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #43761
    David
    Participant

    Hi Shamim,

    I am using the code on this page and the message sends fine.

    https://www.shamimsplugins.com/docs/front-end-pm/customization/send-welcome-message-user-register/

    However, am I right in that the notification email is disabled? Is there a simple way to make it work?

    Thanks for your help.

    #43766
    Shamim Hasan
    Keymaster

    No, Notification email also should be sent.

    #43773
    David
    Participant

    Hi Shamim,

    Thanks for your quick reply.

    I can confirm that if I use your code in functions.php it works fine and the notification email is sent.

    However, I am using it a bit differently. I am using it in relation to another plugin. The code is as follows:

    if($params['formid'] == 69) {

    if ( get_current_user_id() < 1 )
    return;
    if ( ! function_exists( 'fep_send_message' ) )
    return;

    // Prepare message data
    $message = array(
    'message_title' => 'New Enquiry', //change with message title
    'message_content' => $params['fieldname42'], //change with message content
    'message_to_id' => 8037
    );

    $override = array(
    'mgs_author' => get_current_user_id(), //change with message sender id
    );

    // Send message
    fep_send_message( $message, $override );

    }

    When I submit the form on the other plugin the message sends ok but the notification email does not send. I have checked the email log and nothing is sending.

    Can I use it like this? I cannot really see why it does not work.

    Thanks for any further help..

    #43775
    Shamim Hasan
    Keymaster

    in which hook this codes fire? this plugin’s email hook is added using wp_loaded hook. So your other plugin should use this hook or any later hook

    #43778
    David
    Participant

    The plugin is Calculated Fields Form. The code fires immediately after a form is submitted. After that is complete there is a redirect to another page. I do not know anymore than this without asking the plugin authors. I do have an option to use the form submitted email to send the notification instead now that I know the normal fep notification is not going. Thanks for the clarification.

    #43780
    Shamim Hasan
    Keymaster

    If you need to send notification email from fep, you can ask that plugin developer about that hook and let me know. I will try to give you some code changes.

Viewing 6 posts - 1 through 6 (of 6 total)

You need to purchase ‘Front End PM PRO’ to create topic in this support forum.

If you already purchased ‘Front End PM PRO’ please LOGIN.