How to DRY This? (params=>var?)

It probably depends on what you’re doing with it.
If this is going into a model, models accept a hash as an argument to new (or to update_attributes, for that matter) such that you could do Model.new(params[:mail]), and it would auto-populate the fields.

If it’s not, and you just need all those variables to pass as arguments to something else, then you probably don’t need to pull them out into local variables.
But, if you were absolutely 100% needing to DRY that code up, you could do something similar to this:

class MailInfo
def initialize(options = {})
options.each do |key, val|
self.instance_variable_set("@#{key}", val)
self.class.class_eval “attr_accessor :#{key}”
end

end
end
Then do
m = MailInfo.new(params[:mail])
and you should be able to do
m.email_body
m.recipients
etc.