Skip to:
Content
Pages
Categories
Search
Top
Bottom

Change SMTP settings for BBPress


  • tech55541
    Participant

    @tech55541

    Hello,
    I am using this plugin.
    https://wordpress.org/plugins/wp-smtp/

    I am trying to change the sender name and sender email address for BBPress. I have successfully done this for BuddyPress, but all the code I have tried for BBPress or all the code I have seen in older topics, is not doing it for me.

    Can you please recommend some code that I can change the sender name and sender email address?

    Thanks.

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

  • Pascal Casier
    Moderator

    @casiepa

    bbPress should take the same name as all the others. There might be a bbPress related plugin that changes it ? (just a guess)

    I’m personally using Postman SMTP and that one seems to suit my needs.
    Pascal.


    tech55541
    Participant

    @tech55541

    Hello,
    I still need some code to change these 2 items, if you could help me come up with something, that would be great.


    tech55541
    Participant

    @tech55541

    Hello,
    I found some working code, could you please just check it to make sure it is 100% valid and I am not missing anything?

    /*BBPress email fix*/
    add_filter( 'wp_mail_from_name', 'email_sent_from_name' );
    function email_sent_from_name( $name )
    {
        return 'SITE NAME';
    }
    add_filter( 'wp_mail_from', 'email_sent_from' );
    function email_sent_from( $email )
    {
        return 'email@example.com';
    }

    Yes, I did replace the values with required ones such as the address and send from name.

    Thanks.


    Pascal Casier
    Moderator

    @casiepa

    THat code should work ! I used it about 2 years ago for a quick fix.
    But if you need this code, it means there is somewhere a plugin that is doing strange things !


    tech55541
    Participant

    @tech55541

    Hello,
    Yes sort of. My email is redirected to Office 365, now on my old host when this happened, I could not use the internal php mail function, it had to be an SMTP account on a sub domain that was not redirected over to Office 365. Although it is not required where I am now, it seems that using SMTP is safer.
    I had to change the sending address and name so BBPress would talk to the WP SMTP plugin if you know what I mean. Had to do the same for BuddyPress.

    Thanks.


    Pascal Casier
    Moderator

    @casiepa

    I fully understand the need for the SMTP plugin, I think we should all use it !
    But I meant that if your standard FROM is changed, it probably means that there is another plugin somewhere manipulating it.
    I had similar issues in the beginning and that why I switched to the other SMTP plugin mentioned above, but with this code, it should work too.
    Pascal.

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