Problem Statement: Recently, in my project, I came across a situation where on a webform submit by the authenticated user I had to send mail based on a configured variable. So, the condition was if variable is set to value 1 mail should be sent to site admin, else if it is configured 2 mail should be sent to the users which were referenced from the current user via field (say field_user_references) and tricky part if user field (field_user_references) is empty, mail should go to the site admin only.
Now, first obvious, easy and probably perfect solution comes to the mind is custom. Let's make a form alter and add our custom submit handler and play with the code to achieve functionality, quite easy!!!
But, what if we achieve this via Rules module.