added encryption and smtp auth