1
votes

I have an option to send an email to an arbitrary email address when a user updates their profile using rules. I want to send those fields which are updated by user.

How can I do this??

I am using the user, user_register_notify, and profileplus modules in Drupal.

Thanks in advance.

1
please paste some code and then ask what is not working - Khurram Ijaz
Acuallay i don't know how it will work. Now i create a rule from admin side and give the the option to send a mail. Ii is a default drupal option. Now i want to mail the updated fields - user840298

1 Answers

1
votes

Steps:

1> You can use a custom submit callback where you can get he updated values in $form_state variable. This can be done in hook_form_alter(defining custom submit callback).

2> Put these variables in $params inside your custom submit callback. Now call a drupal_mail where you pass the $params as an argument.

3> Now define a hook_mail function and handle this mail in the required way.

Hope this helps.