Home › Forums › Front End PM PRO › Notification emails using fep_send_message function
- This topic has 5 replies, 2 voices, and was last updated 4 years, 2 months ago by Shamim Hasan.
- AuthorPosts
- October 7, 2021 at 1:34 pm #43761DavidParticipant
Hi Shamim,
I am using the code on this page and the message sends fine.
https://sp-test1.arogga.co/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.
October 8, 2021 at 12:13 am #43766Shamim HasanKeymasterNo, Notification email also should be sent.
October 10, 2021 at 10:15 pm #43773DavidParticipantHi 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..
October 11, 2021 at 3:25 pm #43775Shamim HasanKeymasterin which hook this codes fire? this plugin’s email hook is added using
wp_loadedhook. So your other plugin should use this hook or any later hookOctober 11, 2021 at 10:38 pm #43778DavidParticipantThe 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.
October 12, 2021 at 12:51 am #43780Shamim HasanKeymasterIf 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.
- AuthorPosts
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.