Simple Machines Community Forum

Customizing SMF => Bridges and Integrations => Topic started by: Geekologist on June 18, 2017, 01:04:19 PM

Title: Extarnal PM function
Post by: Geekologist on June 18, 2017, 01:04:19 PM
My external site has access to SMF db so creating a function which does a action in the SMF db isn't a problem.

I do not understand how the PM setup is working, I tried creating a function which sends a PM, but didn't work.. Not sure how it all hangs together.. Anyone able to give me an example maybe?

As far I can tell, there is 2 db tables belonging to the PM system, but how do they relate, which id goes where?
Title: Re: Extarnal PM function
Post by: Arantor on June 18, 2017, 01:21:58 PM
You don't touch the tables directly. Call the sendpm function in Subs-Post.php to do it for you.
Title: Re: Extarnal PM function
Post by: Kindred on June 18, 2017, 01:23:52 PM
https://support.simplemachines.org/function_db/index.php
Title: Re: Extarnal PM function
Post by: Geekologist on June 18, 2017, 01:55:19 PM
@Arantor, thanks for your reply, should be able to use that function. And just to note, I'm not trying to spy on members PM, but we have a external system which needs to send the member a PM with information.

@Kindred, thanks. That was very helpful  :)