Skip to:
Content
Pages
Categories
Search
Top
Bottom

Adding Custom Emails

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

  • Paul Gibbs
    Keymaster

    @djpaul

    The error is “missing_email”, which happens when we get can’t find an email post in the database with the term “post_recieved_comment” (in our special bp-email-type taxonomy).

    First thing to do, is re-install the email; go to wp-admin Tools > BuddyPress, then choose the re-install email option. After this, go to wp-admin Emails, and see if you can see your custom email listed.

    If it doesn’t appear, please pastebin all the custom code you’ve added for this, and i’ll take a look. Thanks!


    kmligue
    Participant

    @kmligue

    @djpaul I did what u suggested and I see now the custom email in wp-admin Emails. But I still get the same error in ‘bp_send_email’ function. I couldn’t figure out the reason. No code is added.


    Paul Gibbs
    Keymaster

    @djpaul

    You HAVE added custom code, otherwise you would not have seen your new email appear there. Please show me all the code you’ve used to add this email — and don’t just say that it’s the same as what’s in the guide you linked to in your original post, please.

    The problem is the email recipient is not being set because you’re not assigning that data correctly where you call bp_send_email, so I need to see that function to tell you what’s wrong.


    kmligue
    Participant

    @kmligue

    Ok. These are the 2 functions I added in bp-custom.php. http://pastebin.com/DyviFVaw


    Paul Gibbs
    Keymaster

    @djpaul

    I see it! This line sets the term for the new email post:

    > $tt_ids = wp_set_object_terms( $post_id, ‘post_received_comment’, bp_get_email_tax_type() );

    Note “post_received_comment”.

    This line sends the email:

    > $r = bp_send_email( ‘post_recieved_comment’, (int) $post->post_author, $args );

    Note “post_recieved_comment”. https://en.wikipedia.org/wiki/I_before_E_except_after_C 😀
    Change the spelling in the latter to match the former.


    kmligue
    Participant

    @kmligue

    UGH! Thanks! I was so damned.


    Paul Gibbs
    Keymaster

    @djpaul

    🙂


    kmligue
    Participant

    @kmligue

    @djpaul Is there a way to add this option in the email notification settings? Where user can enable/disable this option.

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