Improve variables scope: rcmail -> ref