change the way to find the host in mailers