Fixes bug when sending emails in production (Thread can't get server name)