Programmatically submit user reset password form
An alternative approach is this:

global $language;
$account = user_load_by_name($username);
if ($account) {
// Mail one time login URL and instructions using current language.
$mail = _user_mail_notify('password_reset', $account, $language);
  if (!empty($mail)) {
    watchdog('user', 'Password reset instructions mailed to %name at %email.', array('%name' =&gt; $account-&gt;name, '%email' =&gt; $account-&gt;mail));
  }
}


Essentially all you need is:

_user_mail_notify('password_reset', $account, $language);


More info: user_pass_submit