@st7878,
Go to wp-content/plugins/wpforo-private-messages/wpforopm.php file, search the below function(code)
public function send_notification_mail($args){
and replace the hole code with this one
public function send_notification_mail($args){
if( !$this->options['email_notification'] ) return false;
if( $args['folderid'] == WPF()->current_object['pm_folderid'] ){
$folder = WPF()->current_object['pm_folder'];
$userids = $this->folder->get_userids();
$exclude_sendmail = $this->folder->get_exclude_sendmail();
}else{
$folder = $this->folder->get_folder($args['folderid']);
$userids = $this->folder->get_userids($folder);
$exclude_sendmail = $this->folder->get_exclude_sendmail($folder);
}
$userids = array_diff($userids, $exclude_sendmail);
if( !empty($userids) ){
$folder_title = $this->folder->make_title($folder);
$subject = $this->options['new_pm_notification_email_subject'];
$message = $this->options['new_pm_notification_email_message'];
$from = ( $member = WPF()->member->get_member($args['fromuserid']) ) ? wpforo_user_dname($member) : '';
$from_tags = array("[conversation]", "[from]", "[msg]");
$to_words = array(
'<a href="' . esc_url($this->get_conversation_url($folder)) . '"><strong>' . sanitize_text_field($folder_title) . '</strong></a>',
'<br><em>' . $from . '</em>',
'<br><br> '. $args['message'] .' <a href="' . esc_url($this->get_conversation_url($folder)) . '"> ' . wpforo_phrase('Conversation Link', false) . ' >></a>'
);
$subject = stripslashes(str_replace($from_tags, $to_words, $subject));
$message = stripslashes(str_replace($from_tags, $to_words, $message));
$message = wpforo_kses($message, 'email');
$headers = wpforo_mail_headers();
add_filter( 'wp_mail_content_type', 'wpforo_set_html_content_type' );
foreach ($userids as $userid){
if( WPF()->member->is_online($userid) ) continue;
$user = get_userdata($userid);
wp_mail( $user->user_email, sanitize_text_field($subject), $message, $headers );
}
remove_filter( 'wp_mail_content_type', 'wpforo_set_html_content_type' );
return TRUE;
}
return false;
}
It's almost the same code, only changed one line, so you can see where the code starts and ends.