Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to change admin notification email address?

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

  • Robin W
    Moderator

    @robin-w

    try this in your functions file

    function rew_no_reply_per_forum ($reply_address) {
    	$forum_id = bbp_get_forum_id() ;
    	if $forum_id = 6 $reply_address =  'xxx@yyy.com' ;
    	if $forum_id = 7 $reply_address =  'abd@hdhd.com' ;
    	return $reply_address ;
    }
    
    add_filter ('bbp_get_do_not_reply_address', 'rew_no_reply_per_forum') ;

    maxlevel
    Participant

    @maxlevel

    I pasted it in the functions.php file of my child theme and it threw this error message before I could save it:
    ————————————-

    Your PHP code changes were rolled back due to an error on line 271 of file wp-content/themes/kleo-child/functions.php. Please fix and try saving again.

    syntax error, unexpected ‘$forum_id’ (T_VARIABLE), expecting ‘(‘

    ————————————-

    Line 271 is:

    if $forum_id = 18747 $reply_address = 'mlt-club@monalisa-twins.com' ;

    The first item in the list of forums


    Robin W
    Moderator

    @robin-w

    sorry, untested and taken from my files – try

    function rew_no_reply_per_forum ($reply_address) {
    	$forum_id = bbp_get_forum_id() ;
    	if ($forum_id == 6 ) $reply_address =  'xxx@yyy.com' ;
    	if ($forum_id == 7) $reply_address =  'abd@hdhd.com' ;
    	return $reply_address ;
    }
    
    add_filter ('bbp_get_do_not_reply_address', 'rew_no_reply_per_forum') ;

    maxlevel
    Participant

    @maxlevel

    This is it! Small, beautiful and works like a charm.
    Thanks


    Robin W
    Moderator

    @robin-w

    great – glad you are fixed


    andrew55
    Participant

    @andrew55

    @robin-w – thank you very much for sharing the “from email” snippet. Works great!


    Robin W
    Moderator

    @robin-w

    great – glad you are fixed


    atonybert
    Participant

    @atonybert

    Thanks from me

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.
Skip to toolbar