Skip to:
Content
Pages
Categories
Search
Top
Bottom

Multisite installation: problem with mail server

  • @gdusoc3

    Participant

    Hi,
    WP 4.7, latest BBpress. I have a multisite: swissinformatic.org, magazine.swissinformatics.org, [other stuff]swissinformatics.org. My mail server is @swissinformatics.org and the plugin picks up $_SERVER['SERVER_NAME'] to create the no reply address.
    COULD YOU HELP US with a setting box to supersede this value?
    Meanwhile I replaced it with my site name in the functions.php code, but mind the next plugin update!
    $sitename = strtolower( ‘swissinformatics.org );
    Always beware of “Educated guess’ I’m not going to buy a mail server for each subdomain and with the present security of providers,…
    I also created a no reply alias of my administrative e-mail address.
    Everything is fine now

    Subscriptions ***********************************************************/

    /**
    * Get the “Do Not Reply” email address to use when sending subscription emails.
    *
    * We make some educated guesses here based on the home URL. Filters are
    * available to customize this address further. In the future, we may consider
    * using admin_email instead, though this is not normally publicized.
    *
    * We use $_SERVER['SERVER_NAME'] here to mimic similar functionality in
    * WordPress core. Previously, we used get_home_url() to use already validated
    * user input, but it was causing issues in some installations.
    *
    * @since bbPress (r5409)
    *
    * @see wp_mail
    * @see wp_notify_postauthor
    * @link https://bbpress.trac.wordpress.org/ticket/2618
    *
    * @return string
    */
    function bbp_get_do_not_reply_address() {
    $sitename = strtolower( $_SERVER[‘SERVER_NAME’] );
    if ( substr( $sitename, 0, 4 ) === ‘www.’ ) {
    $sitename = substr( $sitename, 4 );
    }
    return apply_filters( ‘bbp_get_do_not_reply_address’, ‘noreply@’ . $sitename );

Viewing 1 replies (of 1 total)
  • @robin-w

    Moderator

    Do you know how to put code in your theme’s function file ?

    if so add this to it

    add_filter( ‘bbp_get_do_not_reply_address’, ‘noreply@swissinformatics.org' );

    and that will not get overwritten on upgrade of bbpress plugin

    Of course that will need a child theme, as otherwise it will get lost on a theme update !

    If any of that not clear (or not possible) come back !

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