def emailer(self):
     if 'email' in self.config:
         return SMTPEmailer(
             host=self.config['email']['host'],
             user=self.config['email']['user'],
             password=self.config['email']['password'],
             use_tls=True,
             default_sender='CodaLab <*****@*****.**>',
             server_email='*****@*****.**',
         )
     else:
         return ConsoleEmailer()
Beispiel #2
0
 def emailer(self):
     if 'email' in self.config:
         # Default to authless SMTP (supported by some servers) if user/password is unspecified.
         return SMTPEmailer(
             host=self.config['email']['host'],
             user=self.config['email'].get('user', '*****@*****.**'),
             password=self.config['email'].get('password', None),
             use_tls=True,
             default_sender='CodaLab <*****@*****.**>',
             server_email='*****@*****.**',
         )
     else:
         return ConsoleEmailer()