Update mailservice to take config.