'Checks SMTP settings.'

def check_smtp(self):

    if self.enable_outgoing:
        if (not self.smtp_server):
            frappe.throw(_(u'{0}    is    required').format(u'SMTP    Server'))
        server = SMTPServer(login=(getattr(self, u'login_id', None) or self.email_id), server=self.smtp_server, port=cint(self.smtp_port), use_tls=cint(self.use_tls))
        if self.password:
            server.password = self.get_password()
        server.sess
