Fixed some stuff with sending emails.

Made setting up the SMTP server only happen once and removed password storing.