Skip to:
Content
Pages
Categories
Search
Top
Bottom

Solved – BuddyPress Smtp Settings

  • @drstrats

    Participant

    Hi
    I’m using BuddyPress and upon registration of users, the email notifications are sent using the hosting server which lands 100% of the times at spam folder.
    to solve this I’ve installed the WP Mail SMTP plugin but this it didn’t affect BuddyPress Smtp settings.
    Please someone with a solution to solve this.
    Thanks

Viewing 23 replies - 1 through 23 (of 23 total)
  • @vapvarun

    Participant

    Try mailgun, easy to set up and the free plan will be enough.

    @drstrats

    Participant

    @vapvarun thanks for your reply

    Try mailgun, easy to set up and the free plan will be enough.

    but I’m not talking about how to setup wp mail plugin because I’ve already done that.
    the problem is BuddyPress still uses the hosting server to send emails and it ignores the wp mail configuration.

    @vapvarun

    Participant

    okay got it, you can add following codes inside
    bp-custom.php or child theme functions.php to override
    add_filter('bp_email_use_wp_mail', '__return_true');

    @vapvarun

    Participant

    @drstrats

    Participant

    I couldn’t find the bp-custom.php file so, I did add it to the bp-core-functions.php file then I test to send an email through BuddyPress. It was successfully delivered by the WP mail configurations but now another problem appeared, the email delivered in plain text format showing all the Html code as plain text.

    @sirlouen

    Participant

    I can confirm that this is still an issue: if forcing wp_mail , buddypress mails can’t be HTML.

    Not sure why buddypress never switched to wp_mail which is the wp standard.

    @alwaysalready

    Participant

    I found a way to resolve this problem using a mixture of ideas others have shared elsewhere. I’ve put the details in a blog post here. In summary, what worked for me was the following in the bp-custom.php file:

    // Set BP to use wp_mail
    add_filter( 'bp_email_use_wp_mail', '__return_true' );
     
    // Set messages to HTML
    remove_filter( 'wp_mail_content_type', 'set_html_content_type' );
    add_filter( 'wp_mail_content_type', 'set_html_content_type' );
    function set_html_content_type() {
        return 'text/html';
    }
     
    // Use HTML template
    add_filter( 'bp_email_get_content_plaintext', 'get_bp_email_content_plaintext', 10, 4 );
    function get_bp_email_content_plaintext( $content = '', $property = 'content_plaintext', $transform = 'replace-tokens', $bp_email ) {
        if ( ! did_action( 'bp_send_email' ) ) {
            return $content;
        }
        return $bp_email->get_template( 'add-content' );
    }
    //Optionally remove the filter above after it's run
    remove_filter('wp_mail','redirect_mails',20);
     
    // Optionally change your email address
    add_filter('wp_mail_from','noreply_from');
    function noreply_from($from) {
      return 'noreply@YOUR_DOMAIN.org'; //Replace 'YOUR_DOMAIN.org' with email address
    }
    
    // Optionally change your from name
    add_filter('wp_mail_from_name','noreply_from_name');
    function noreply_from_name($name) {
        return 'YOUR_DOMAIN No-Reply'; //Replace 'YOUR_DOMAIN No-Reply' with the from name
    }

    @shanebp

    Moderator

    @alwaysalready – thanks for posting your solution.
    Perhaps you could convert your blog article into a page in the codex.

    @nqui

    Participant

    @alwaysalready Thank you so much!!!!!
    Your solution sorted everything. I so appreciate it!!!!!!!!!!!!!!!

    In case it is interesting to anyone, to try fix this before coming to this thread, I:
    1. installed “Check Email” to see if there was a problem sending emails from my site (there wasn’t)
    2. installed “WP Mail SMTP”, setting up SMTP with all its complications in case it was some sort of spam issue (it wasn’t)
    3. discovered using the above that the registration emails were being bounced with the error message “Diagnostic-Code: smtp; 550 Messages should have one or no To headers, not 2.” When I looked at the headers, sure enough, there were two “To: destination-email-address” lines in the header.
    4. Deactivated BuddyPress. Found that registration emails successfully went through.
    5. Finally came here, having found out that BuddyPress was definitely the culprit.

    All this has been quite stressful, it is the first website I’ve ever set up.

    @coolhunt

    Participant

    @alwaysalready WOW.. Great stuff! Great Work!
    Your blog post on the issue and fix was very well written!
    Im trolling thru your blog now to pick up a few more tips and tricks 😀

    @alwaysalready

    Participant

    Thank you @nqui and @coolhunt. Glad it’s been helpful. @shanebp, I’ll look into adding it to the codex. Thank you for the suggestion.

    @sayri88

    Participant

    You are the best, thank you for creating this solution. 🙂

    @taqtik

    Participant

    This works really well. Thank you so much!

    @narolles

    Participant

    Hello thank you @alwaysalready et @vapvarun
    Your solution is still useful for me.
    This allows me to have my buddypress emails sent through the Mailpoet plugin configuration (3rd party smtp Sendgrid)
    the noreply part cannot be applied since it takes the from configuration of Mailpoet
    Thanks again, maybe Buddypress could simplify this Thanks to the experts

    @raoof12323

    Participant

    Hi drstrats,

    Greetings! I understand the challenge you’re facing with BuddyPress email notifications ending up in the spam folder. To resolve this issue, follow these steps:

    1. BuddyPress SMTP Settings:
    Ensure that BuddyPress is configured to use SMTP for sending emails. Navigate to the BuddyPress settings, and look for the email configuration section. You might find options to input SMTP details like server, port, username, and password. Set these up according to your email provider’s specifications.

    2. WP Mail SMTP Plugin:
    It’s great that you’ve installed the WP Mail SMTP plugin. To make sure it integrates with BuddyPress, go to the WP Mail SMTP settings. You’ll find an option to enable SMTP for BuddyPress emails. Ensure it’s checked, and save the settings.

    3. Testing:
    After configuring the above settings, send a test email through BuddyPress. Check the spam folder and see if the issue persists. Sometimes, it might take a little time for the changes to take effect.

    If the problem continues, consider reaching out to your hosting provider to verify if there are any server-specific configurations affecting email delivery.

    On a lighter note, when it comes to making moments special, have you ever considered expressing yourself with flowers? Explore the offerings from the best flower shops in McAllen, TX. Their delightful arrangements might just be the perfect touch for any occasion.

    Wishing you success in resolving the SMTP matter, and may your BuddyPress notifications reach their recipients seamlessly.

    Best regards,

    [raoof]
    Best Flower Shops in McAllen, TX

    @ingenxcomputers

    Participant

    @raoof12323

    Thank you

    That has completely fixed the spam problem I had

    thank you to alwaysalready aswell

    @riazoo518

    Participant

    Hi,
    Have you tried checking your SMTP settings in BuddyPress directly? Ensure they align with the configuration in WP Mail SMTP plugin. Additionally, verify if your hosting provider has any specific requirements for SMTP setup. You may need to coordinate with them to improve email deliverability. Good luck!

    @riazoo518

    Participant

    good correct.

    @raoof12323

    Participant

    Good its amazing answer . i have some extra information this visit chaise lounge cushions

    @raoof12323

    Participant

    To improve BuddyPress email delivery with WP Mail SMTP:

    Check and configure SMTP settings in WP Mail SMTP.
    Verify BuddyPress uses the correct SMTP details.
    Test email delivery using WP Mail SMTP.
    Ensure SPF and DKIM records are set up.
    Check spam score online.
    Seek support from your hosting provider if needed.
    For more assistance, visit [NA Whatsapp].

    @sirlouen

    Participant

    @shanebp

    This is the advent of the spammers in the buddypress forum?

    @raoof12323

    Participant

    you are also right but i have some extra information about it Fisioterapia a Domicilio en Guatemala

    @werny

    Participant

    Question: I am using the ASE Plugin instead of the Mail SMTP Plugin. Do you think this plugin does the job?
    Many users complain that they never get the confirmation Mail in this period

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