- Issue created by @BLausch
- ivnish Kazakhstan
Hi!
In the new version of privatemsg messages and threads are drupal entities. You can create it programmatically by any way.
See https://git.drupalcode.org/project/privatemsg/-/blob/2.0.x/src/Form/Priv... how to create new message and new thread
and https://git.drupalcode.org/project/privatemsg/-/blob/2.0.x/src/Form/Priv... how to create message to existing thread.
You can wrap this code to your function with name privatemsg_new_thread($some_variables) if you need
- Status changed to Fixed
8 months ago 2:15pm 17 April 2024 Automatically closed - issue fixed for 2 weeks with no activity.
- ivnish Kazakhstan
I added some functions and some documentation 📌 How to send message programmatically Fixed