MyBB Community Forums

Full Version: Sending PM's from site
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello all! How i can send pm from my portal (no mybb portal) to anyone. I added new pm to database but notice about new pm doesnt showed in index page.
Are you saying you added a new pm via something like phpmyadmin? I don't complete understand what you are saying you did.
I added a new pm from my php script. The pm was in the box but i dont had information about the new pm in main page.
What query/queries did you use to add the new PM?
mysql_query("INSERT INTO mybb_privatemessages VALUES('', '2', '2', '3', 'a:1:{s:2:"to";a:1:{i:0;s:1:"2";}}', '1', 'Subject', '0', 'Spam Message :P', '1250266020', '0', '0', '0', '0', '0', '1', '0')");

Only this

#edit
In 'users' table is row 'pmnotice'. I update this to '2' and nothing.
Take a look at pm.php. It has a PMDataHandler class. Inside there it has a method that you can use to insert the pm. It is called insert_pm. The file is located inc>datahandlers>pm.php
I think out this problem. I must change row 'unreadspms' in table 'users'. Also thank you for help.
You should use the class because then you won't have to change your code if something gets changed with the PM system in how it is saved.