When an organization or a user got an invite or alert from Rootable, it was from
"software@foodrescuealliance.org." This has caused a lot of confusions when
on-boarding volunteers. They don't know what Food Rescue Alliance is, why are
they getting an email from this random org? They were confused when they find
out its the Rootable email, and often it went to their spam folder. Previously,
updating the email was a code change which made the process of changing it
difficult. Also, if another organizations self-hosted Rootable, it wasn't be
easy for them to discover and update the email address accordingly.
So this is now configurable via an env variable. The env variable sets
Rails.config.smtp_sender_address, which in turn sets Devise's
config.mailer_sender. The config.mailer_sender is set as a lambda because
then it can be overridden for tests.
We also considered letting each org control where email is sent from. However,
we'd have to verify every org's domain which is a bit bigger than this task.
Perhaps in the future.