Skip to:
Content
Pages
Categories
Search
Top
Bottom

Email change frontend not sending confirmation email

  • @mhmart

    Participant

    I have tried both Post SMTP plugin and wp mail SMTP plugin but neither of them are sending a confirmation email when the user changes its email address on the frontend url:

    
    https://mysite/members/username/settings/
    

    This is odd, from the backend the mail is being sent. The smtp plugins are setup correctly. Seems some issue with wp?

    I have tried numerous suggestions from this forum:
    https://buddypress.org/support/topic/buddypress-email-notification-ignoring-smtp-server-settings/

    
    add_filter('bp_email_use_wp_mail', '__return_true'); // this I added to bp-custom.php in wp-content/plugins/bp-custom.php
    

    Any other solutions?

Viewing 8 replies - 1 through 8 (of 8 total)
  • @emaralive

    Moderator

    I’m not clear on which/what email that is not being sent. AFAIK, there are 2 emails sent for a successful email address change, for example from the WordPress (WP) backend:

    1. Email Change Request <- contained in subject line as sent by WP
    2. Email Changed <- contained in subject line as sent by WP – after a successful change of email address

    For the BuddyPress (BP) frontend:

    1. Verify your new email address <- contained in subject line as sent by BP
    2. Email Changed <- contained in subject line as sent by WP – after a successful change of email address

    For the BP process, please indicate which of the 2 emails is not being sent.

    @mhmart

    Participant

    I am sorry for the ambiguity, it is option 1.

    fot the BP process, both emails are being sent. However, for the buddyPress frontend, verify “your new email address” is not being sent.

    @emaralive

    Moderator

    Assuming that you are currently utilizing the ‘bp_email_use_wp_mail‘filter hook that is returning a value of ‘true‘, additional questions are:

    • Does this situation apply to all Users?
    • If you @mention yourself in an Activity post, do you receive an email indicating such?

    This may take a few passes to nail down the source of the issue, so let’s start with some questions that might help in discovering what might be causing the 1st email from being sent.

    @mhmart

    Participant

    Thank you for the response.

    – Yes, the situation applies to all users, or well, the most for which I could test ofcourse.

    – I cannot mention myself in activity posts on our site for I don’t know which reason, so I can’t test that unfortunately.

    What I did:
    in wp-content/plugins/ i created a file called bp-custom.php and added the following:

    
    <?php add_filter('bp_email_use_wp_mail', '__return_true');
    

    @emaralive

    Moderator

    Your second answer is a bit confusing, if you have the Activity component activated, then all you would have had to do was to enter @username (replace username with your actual username) in the Activity post form and the click “Post Update”, afterwards you could delete the post. The reason for doing this is to test whether or not BuddyPress (BP) is sending emails in general and your issue isn’t just isolated with the changing of email address.

    Moving along, BP, by default, has a finite number of email templates with corresponding situations that will fire/send an email based on the situation: For example:

    • 21 email templates for a single site installation
    • 22 email templates for a multisite installation

    You can verify the count of email templates by clicking the menu items “Emails > All Emails” within the wp-admin area. You should have a “Published” count number the is equal to or greater than what was previously indicated.

    The email template that is responsible for sending the “email change notice” is:

    
    [{{{site.name}}}] Verify your new email address
    

    Make sure the template is present and the status is set to “Published”. Additionally, check that the situation assigned to this template is:

    
    settings-verify-email-change
    

    If these conditions are true (template is present, published and the correct situation is assigned) then BP should be sending the “Verify your new email address” email”, given that you aren’t receiving errors that might be interrupting the sending process.

    @mhmart

    Participant

    I am very sorry for the confusing. I wasn’t aware of that part that needed to be activated. In the BP settings I activated Activity and then, as you said, I could mention a person. I both mentioned me and in another post I mentioned someone else. Neither me or the other person received any email.

    Now I did check the Emails > All Emails page in the admin and I only found 6 of them.
    Is there a way of restoring the 21 email templates as you suggested? I assume that this indeed is causing the issue.

    I found these options in the repair tool of buddy press emails, but I will not click anything before I’m sure what it might cause:
    (used google translater from dutch).

    • Reset all BuddyPress slugs to default slugs.
    • Fix the total group count for each member.
    • Fix the total member count.
    • Reset emails (delete and reset to default values).
    • Create the database table for invitations and migrate existing group invitations if necessary./li>

    @mhmart

    Participant

    Ok, to answer my own question the solution was to select the ‘Reset emails (delete and reset to default values).’ option in wp admin > tools > buddypress > repair

    Thank you for the help! indeed the issue was missing templates for some reason.

    @emaralive

    Moderator

    Sounds good, take care.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Email change frontend not sending confirmation email’ is closed to new replies.
Skip to toolbar