How to use url() correctly?
This should work for you:

    $replacements[$original] = url('user/login', array(
      'query' =&gt; array('edit' =&gt; array('name' =&gt; $account-&gt;mail)),
      'absolute' =&gt; TRUE,
    ));


Sidenote: you are naming the argument as name but you are passing the mail.