(self, sender: str)
| 244 | self.smtp.login(sender, passwd) |
| 245 | |
| 246 | def get_server(self, sender: str): |
| 247 | key = sender.rstrip('.com').split('@')[-1] |
| 248 | server = { |
| 249 | 'qq': 'smtp.qq.com', |
| 250 | 'foxmail': 'smtp.qq.com', |
| 251 | '163': 'smtp.163.com', |
| 252 | 'sina': 'smtp.sina.com', |
| 253 | 'gmail': 'smtp.gmail.com', |
| 254 | 'outlook': 'smtp.live.com', |
| 255 | } |
| 256 | return server.get(key, f'smtp.{key}.com') |
| 257 | |
| 258 | @staticmethod |
| 259 | def parse_results(results: list): |