Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By tinerfe on
Hi there.
Sorry if I repeat this post, I have been reading a lot of post about this or similar but no one helped me.
Im trying to send an email when I add a new content where I reference a determined user, to notificate him there are a new element for him.
I have "references" module ofr "User references", I use Rules module too.
But I have no way for it works. If I put an email en the field "value" its work, but I want send an email to the user referenced when I create the new content.
Help, please.
A screenshot
http://s13.postimg.org/wfvee6cuu/Imagen4.jpg
(I dont know how to upload an image)
Comments
hi tinerfe,
hi tinerfe,
First in actions create a new action fetch entity by id. Then select user and put node:field-user:uid in data selector. Now add send mail action and in 'to' you can put fetch entity properties for mail it would be like this [entity-fetched:mail] .
I cannot put node:field-user
I cannot put node:field-user:uid, In my content there are no user field, there are a "user reference" field, but anywise, it doesn't appear too.
Maybe is better reference users in the content using other type of field?
_
iirc, you have to add a condition for 'entity has field' and specify your reference field before you can use it in actions.
but I cannot, there aren't
but I cannot, there aren't any entity to select the user reference.
For example: Node:to_person
for reference the field of the user referenced in the content.
Thanks worked me
@tinerfe :Thanks for your reply It worked for me.