(self, text: str)
| 272 | return text |
| 273 | |
| 274 | def send(self, text: str): |
| 275 | print(f'{len(text)} {text[:50]}...{text[-50:]}') |
| 276 | print(text) |
| 277 | |
| 278 | msg = MIMEText(text, 'html') |
| 279 | msg['Subject'] = Header(f'每日安全资讯({today})') |
| 280 | msg['From'] = self.fromwho |
| 281 | msg['To'] = self.receiver |
| 282 | |
| 283 | try: |
| 284 | self.smtp.sendmail(self.sender, self.receiver, msg.as_string()) |
| 285 | Color.print_success('[+] mailBot 发送成功') |
| 286 | except Exception as e: |
| 287 | Color.print_failed('[+] mailBot 发送失败') |
| 288 | print(e) |
| 289 | |
| 290 | def send_raw(self, title, text): |
| 291 | pass |
nothing calls this directly
no test coverage detected