Hi,
I am trying to add roles using velocity script throug widget.
my requirement is that need to sent an email notification to user who had got new role .(same as achievement)
can any one provide code to sent emails from the widget.
Hi,
I am trying to add roles using velocity script throug widget.
my requirement is that need to sent an email notification to user who had got new role .(same as achievement)
can any one provide code to sent emails from the widget.
This can't be done purely from a widget. The best approach for this is via a plugin which handles RoleUsers events and raises a notification. Besides the fact that this isn't possible purely via widget code, other benefits of this approach are that the notification would be triggered no matter how the role is applied (i.e. through the API, not just through the widget) and the notification would be received by the user in whatever way they have configured (which can be more than just email).
I'd recommend reviewing the following:
Creating plugin enables sending mails to each and every role .
This can be done by creating a rule
when user is assigned a particular role then send email