In my project there are two types of user.Using profile2 module i creates 2 profiles. 1) normal user 2) Lawyer

So i have to send promotion email to lawyer after registration. i created following rule.

1) Event - After saving a new profile

2) condition - user has roles

a]After selecting they ask for Data selector. i don't know what i select for my lawyer account

b]i select "lawyer" Roles

c]match roles - all)

3) Event In event i select send-email

a]email function $to - how i can put current user registration email

b] body is static

c] subject is static

I am really confuse. Can i create hook for send email to lawyer after registration.


In condition add data comparison instead of user role if want to send mail only basis of profile type as below.

enter image description here enter image description here enter image description here


In Action Section Select Send Main or Send Html Mail under System and follow as below png file. enter image description here

This may help it..

  • In action i select send email option, but in "TO" how i can put current registration user email – Swapnil0226 Mar 26 '15 at 8:23
  • Please help me... – Swapnil0226 Mar 26 '15 at 8:50
  • i have edited the answer please check it i think it will help you... – bisw Mar 26 '15 at 9:09
  • Yup,I receive email but they showing error messege "Unable to send e-mail. Contact the site administrator if the problem persists." – Swapnil0226 Mar 26 '15 at 9:17
  • I think you did not configure mail system correctly, that's why it showing this error. it does not related to rule module. Please check the mail system configuration .. – bisw Mar 26 '15 at 9:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.