Ticket #2618: 2618.3.diff
File 2618.3.diff, 3.3 KB (added by , 11 years ago) |
---|
-
src/includes/common/functions.php
1062 1062 $reply_content = strip_tags( bbp_get_reply_content( $reply_id ) ); 1063 1063 $reply_url = bbp_get_reply_url( $reply_id ); 1064 1064 $blog_name = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ); 1065 $do_not_reply = ' <noreply@' . ltrim( get_home_url(), '^(http|https)://' ) . '>';1065 $do_not_reply = 'noreply@' . ltrim( get_home_url(), '^(http|https)://' ); 1066 1066 1067 $from_email = apply_filters( 'bbp_subscription_from_email', $do_not_reply ); 1068 1067 1069 // For plugins to filter messages per reply/topic/user 1068 1070 $message = sprintf( __( '%1$s wrote: 1069 1071 … … 1099 1101 $headers = array(); 1100 1102 1101 1103 // Setup the From header 1102 $headers[] = 'From: ' . get_bloginfo( 'name' ) . ' ' . $do_not_reply;1104 $headers[] = 'From: ' . get_bloginfo( 'name' ) . ' <' . $from_email . '>'; 1103 1105 1104 1106 // Get topic subscribers and bail if empty 1105 1107 $user_ids = bbp_get_topic_subscribers( $topic_id, true ); … … 1122 1124 /** Send it ***************************************************************/ 1123 1125 1124 1126 // Custom headers 1125 $headers = apply_filters( 'bbp_subscription_mail_headers', $headers ); 1127 $headers = apply_filters( 'bbp_subscription_mail_headers', $headers ); 1128 $to_email = apply_filters( 'bbp_subscription_to_email', $do_not_reply ); 1126 1129 1127 1130 do_action( 'bbp_pre_notify_subscribers', $reply_id, $topic_id, $user_ids ); 1128 1131 1129 1132 // Send notification email 1130 wp_mail( $ do_not_reply, $subject, $message, $headers );1133 wp_mail( $to_email, $subject, $message, $headers ); 1131 1134 1132 1135 do_action( 'bbp_post_notify_subscribers', $reply_id, $topic_id, $user_ids ); 1133 1136 … … 1202 1205 $topic_content = strip_tags( bbp_get_topic_content( $topic_id ) ); 1203 1206 $topic_url = get_permalink( $topic_id ); 1204 1207 $blog_name = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ); 1205 $do_not_reply = ' <noreply@' . ltrim( get_home_url(), '^(http|https)://' ) . '>';1208 $do_not_reply = 'noreply@' . ltrim( get_home_url(), '^(http|https)://' ); 1206 1209 1210 $from_email = apply_filters( 'bbp_subscription_from_email', $do_not_reply ); 1211 1207 1212 // For plugins to filter messages per reply/topic/user 1208 1213 $message = sprintf( __( '%1$s wrote: 1209 1214 … … 1239 1244 $headers = array(); 1240 1245 1241 1246 // Setup the From header 1242 $headers[] = 'From: ' . get_bloginfo( 'name' ) . ' ' . $do_not_reply;1247 $headers[] = 'From: ' . get_bloginfo( 'name' ) . ' <' . $from_email . '>'; 1243 1248 1244 1249 // Get topic subscribers and bail if empty 1245 1250 $user_ids = bbp_get_forum_subscribers( $forum_id, true ); … … 1262 1267 /** Send it ***************************************************************/ 1263 1268 1264 1269 // Custom headers 1265 $headers = apply_filters( 'bbp_subscription_mail_headers', $headers ); 1270 $headers = apply_filters( 'bbp_subscription_mail_headers', $headers ); 1271 $to_email = apply_filters( 'bbp_subscription_to_email', $do_not_reply ); 1266 1272 1267 1273 do_action( 'bbp_pre_notify_forum_subscribers', $topic_id, $forum_id, $user_ids ); 1268 1274 1269 1275 // Send notification email 1270 wp_mail( $ do_not_reply, $subject, $message, $headers );1276 wp_mail( $to_email, $subject, $message, $headers ); 1271 1277 1272 1278 do_action( 'bbp_post_notify_forum_subscribers', $topic_id, $forum_id, $user_ids ); 1273 1279