Skip to:
Content
Pages
Categories
Search
Top
Bottom

Sending message through script

  • Avatar of agundabbo
    agundabbo
    Participant

    @agundabbo

    Hi, I have made a little “warning panel” and I want to send a message automatically that notifies the infraction to the user.
    For now, when it happens, I do this operation.

    Insert into wp_bp_messages_messages (parameters)
    Insert into wp_bp_messages_recipients (parameters) -> for who sends
    Insert into wp_bp_messages_recipients (parameters) -> for who receives
    Insert into wp_bp_messages_recipients (parameters)

    I have two questions:
    The first it is about thread_id parameter: I just set it as last_thread_id +1. I know it is sloopy and probably duplicates conversation between users and ADMIN. I do not think that would be a problem, wouldn’t it?

    The second is about, am I missing something? Because I found that if I send a message this way to the ADMIN, for tests, it is not notified in his mail, but other messages do.
    So ideas?

    Regards.

You must be logged in to reply to this topic.