Fix localization, variable rennaming, use builtin function for send mail