Why don't you try loading the remote user into your controller action and storing it in db or redis when compiling your mail program
Inquiry
The problem, as Vimsha stated, is that you cannot access parameters requestoutside the foreground code
Rails, ?, , (IE ..)
, , , ,
(DRY) Rails , , , .
db ( redis, ),