Closed (fixed)
Project:
Privatemsg
Version:
5.x-1.8
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
22 Jan 2008 at 11:49 UTC
Updated:
5 Feb 2008 at 13:31 UTC
i'm wondering if it's possible to send an automatic message (something like a welcome message) to the new registered users.
How to do that?
Thank you
Da.
Comments
Comment #1
nodestroy commentedi´m working on a workflow_ng action to send a privatemsg. if the action is ready, you could send a automatic message via workflow_ng
you can configure an event which is called, when a user registers. the you configure the privatemsg action...and you are done.
if this http://drupal.org/node/208002 is fixed, the action would be ready soon.
Comment #2
planctus commentedCool,
but i've read you're using the dev version of this module,
did you test it with the "official" release?
If you confirm me this i'll give a try and then i will give you feeedback about the result.
Thanks,
Da.
Comment #3
nodestroy commentedyes, dev version
...i hope, that its stable soon.
i will take a look at the official version.
Comment #4
planctus commentedI've tried and it seems promising,
but i didn't exactly understand how to add the privatemsg action.
Normally you don't have integration between workflow ng and privatemsg, right?
So i thought to use the snippet in http://drupal.org/node/208002,
and i've tried putting in template.php and then using like a "custom php code" in the workflow ng action but didn't work.
Now you know how ignorant i am in php so you have to explain what you do when you code!!
Thanks
Da.
Comment #5
nodestroy commentedi think, you can use this workflow-ng action as well with stable version, the function header is exactly the same:
stable:
function privatemsg_send_privatemsg($recipient, $subject, $body, $format = FILTER_FORMAT_DEFAULT) {
dev:
function privatemsg_send_privatemsg($recipient, $subject, $body, $format = FILTER_FORMAT_DEFAULT, $thread = 0, $type = 'private-message', $variables = array()) {
don´t matter about the optional parameters (thread, type, variables)...we will not need it for the workflow-ng action.
the only problem we have, is that we have to define who is the sender of the message. at the moment this is hardcoded.
if there are no thoughts to solve this problem, we could call _privatemsg_send() in the workflow-ng action.
(waiting for comments from privatemsg maintainers if its ok to call _privatemsg_send)
regards
d.
Comment #6
planctus commentedThis sounds crazy,
but did you take a look at the admin section of Pm module?
Cause there is exactly what we are discussing now, sending a private messages to the new users.
It works with no problem and it doesn't need workflow.
Obviously it is not perfect, you can't choose which role to send and which not, but i set permissions for Pm based on user role so i think this is gonna be a workaround for me.
I've another issue cause i've a bilingual website and i have to find the way to translate the private message and how to send the one related with the user language preference, but this is different...
I need to test more than i already did but i can't understand why we did not check in the module itself, cause it was ready to do this.
If you agree i'm gonna close this issue, thers's nothing to do with this.
Thanks
Da.
Comment #7
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.