Disable welcome message for specific roles but keep for others, user_mail_notify In Drupal 7...

I am trying to find a solution to disable the sending of the user mail register by admin for certain roles. I have scoured the internet and have come up with using a combo of mailcontrol and Rules or custom code in my module.

I'm using Rules to send the message. I didn't want to completely disable the welcome email message for the other roles.

How can I create this functionality of sending the system mail to some users but not others? (either programmatically or via Rules)

I have a custom module already, so I used the following hook but nothing happened. I still get the welcome message.

function myMod_fields_user_mail_notify($op, $account, $language = NULL) {

 $notify = variable_get('user_mail_' . $op . '_notify', $default_notify);

if (in_array('Administrator', $user-&gt;roles)) {
  if ($op == 'register_admin_created') {
   //don't send system email we'll do this with another rule.
    variable_set('user_mail_register_admin_created_notify', false);
  }
  else if ($notify) {
  $params['account'] = $account;
  $language = $language ? $language : user_preferred_language($account);
  $mail = drupal_mail('user', $op, $account-&gt;mail, $language, $params);
}
return empty($mail) ? NULL : $mail['result'];
 }
}
I kind of stumbled on this after nobody answered my question. (I was desperate)

The solutions is to:


Edit your welcome email, under Account Settings.
Enable Mail Control and disable the welcome email. This content is saved  in the database, so don't worry about losing anything.
Create a new Rule to react on a new event: After saving a new user account
Add in your condition: User has Role &amp;&amp; User is being Notified.
Under Actions: Send Account E-mail.
Under E-mail Type: Choose Welcome E-mail.
Save! Clear Cache! Get More Coffee!