EmailConfig.py 884 B

1234567891011121314151617181920212223242526
  1. from datetime import datetime
  2. # 邮件配置
  3. EMAIL_CONFIG = {
  4. "recipients": ["recipient1@example.com", "recipient2@example.com"],
  5. "subject": f"自动化测试报告 - {datetime.now().strftime('%Y-%m-%d %H:%M')}",
  6. "sender_name": "自动化测试系统",
  7. "cc_recipients": ["zhangyu1999520@outlook.com"], # 抄送列表
  8. "bcc_recipients": [], # 密送列表
  9. }
  10. # SMTP服务器配置
  11. SMTP_CONFIG = {
  12. "smtp_server": "smtp.office365.com", # Outlook SMTP服务器
  13. "smtp_port": 587, # Outlook使用的端口
  14. "sender_email": "zhangyuroot@outlook.com", # 发件人邮箱
  15. "sender_password": "zhangyu923", # 发件人密码或应用密码
  16. "use_tls": True, # 是否使用TLS加密
  17. }
  18. # 邮件模板配置
  19. EMAIL_TEMPLATE_CONFIG = {
  20. "template_path": "templates/email_template.html",
  21. "company_name": "Your Company",
  22. "team_name": "QA Team",
  23. }